Bug 27067 - Add option to hide branch from opac-library page
Summary: Add option to hide branch from opac-library page
Status: RESOLVED DUPLICATE of bug 26834
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-20 16:54 UTC by Lucas Gass (lukeg)
Modified: 2021-11-08 15:54 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***