Bug 31654: Hide non-public libraries from MastheadLibraryPulldown (bug_31654_hide_nonpublic_libs)
Do not list library in masthead and advanced search if branches.public is false Test Plan: * Set OpacAddMastheadLibraryPulldown to "Add" * Go to Administration -> Libraries, edit "Fairfield", set "public" = "no" (at the end of the form) * Or connect to DB and run update branches set public = 0 where branchcode like 'F%'; This will set all three libraries starting with F to non-public * open OPAC * The "All libraries" Pulldown in the Header (between search slot and search button) still shows the non-public libraries * Go to OPAC -> Advanced Search, scroll to "Location and availability": The selectbox still shows the non-public libraries Now apply the patch * Open OPAC * The "All libraries" Pulldown in the Header now should not contain the libraries set to "public = no" * And in the Advanced Search "Location and availability" pulldown those libraries should also not be shown. Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Claude Demeure <claude.demeure@mailo.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
cbc2217e2c
commit
de0f7c23ff
2 changed files with 2 additions and 0 deletions
|
@ -232,6 +232,7 @@
|
||||||
[% IF LibrarySearchGroups %]<optgroup label="Libraries">[% END %]
|
[% IF LibrarySearchGroups %]<optgroup label="Libraries">[% END %]
|
||||||
|
|
||||||
[% FOREACH library IN Branches.all( selected => opac_name ) %]
|
[% FOREACH library IN Branches.all( selected => opac_name ) %]
|
||||||
|
[% NEXT UNLESS library.public %]
|
||||||
[% IF library.selected %]
|
[% IF library.selected %]
|
||||||
<option selected="selected" value="branch:[% library.branchcode | html %]">[% library.branchname | html %]</option>
|
<option selected="selected" value="branch:[% library.branchcode | html %]">[% library.branchname | html %]</option>
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
|
|
|
@ -232,6 +232,7 @@
|
||||||
<select name="limit" id="branchloop">
|
<select name="limit" id="branchloop">
|
||||||
<option value="">All libraries</option>
|
<option value="">All libraries</option>
|
||||||
[% FOREACH BranchesLoo IN Branches.all( selected => opac_name ) %]
|
[% FOREACH BranchesLoo IN Branches.all( selected => opac_name ) %]
|
||||||
|
[% NEXT UNLESS BranchesLoo.public %]
|
||||||
[% IF BranchesLoo.selected %]
|
[% IF BranchesLoo.selected %]
|
||||||
<option value="branch:[% BranchesLoo.branchcode | html %]" selected="selected">[% BranchesLoo.branchname | html %]</option>
|
<option value="branch:[% BranchesLoo.branchcode | html %]" selected="selected">[% BranchesLoo.branchname | html %]</option>
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
|
|
Loading…
Reference in a new issue