Bug 27067

Summary: Add option to hide branch from opac-library page
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, hc, lisettepalouse+koha, sally.healey
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Lucas Gass (lukeg) 2020-11-20 16:54:32 UTC
The OPAC library page (/cgi-bin/koha/opac-library.pl) shows all library branches. Often libraries have branches like WAREHOUSE, STORAGE, OR QUARANTINE that they would rather not show on that page. There should be a way to hide them.

Maybe a checkbox option on the branches.tt like "Hide this branch from OPAC"?
Comment 1 Lucas Gass (lukeg) 2020-11-20 16:57:29 UTC
In the short term I am using this jQuery in OPACUserJS to hide unwanted branches:


if ( $('#opac-library').length ) {
    let branches_to_hide = ['STORAGE' , 'OUTREACH' , 'BOOKMOBILE'];
    branches_to_hide.forEach(function(item){
        $('a[href*="'+item+'"]').parent().hide();
    	$('a[href*="'+item+'"]').parent().next('div').hide();
        $('a[href*="'+item+'"]').parent().prev('hr').hide();
    })
}
Comment 2 Holly 2021-11-08 15:54:52 UTC

*** This bug has been marked as a duplicate of bug 26834 ***