Bugzilla – Attachment 143117 Details for
Bug 31654
Hide non-public libraries from MastheadLibraryPulldown
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31654: Hide non-public libraries from MastheadLibraryPulldown (bug_31654_hide_nonpublic_libs)
Bug-31654-Hide-non-public-libraries-from-MastheadL.patch (text/plain), 3.44 KB, created by
Martin Renvoize (ashimema)
on 2022-11-03 14:19:37 UTC
(
hide
)
Description:
Bug 31654: Hide non-public libraries from MastheadLibraryPulldown (bug_31654_hide_nonpublic_libs)
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-11-03 14:19:37 UTC
Size:
3.44 KB
patch
obsolete
>From 55030968980665bc003f86cd28247422b9eaa9d7 Mon Sep 17 00:00:00 2001 >From: Thomas Klausner <domm@plix.at> >Date: Wed, 5 Oct 2022 12:14:31 +0200 >Subject: [PATCH] Bug 31654: Hide non-public libraries from > MastheadLibraryPulldown (bug_31654_hide_nonpublic_libs) >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 1 + > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt | 1 + > 2 files changed, 2 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index c13f52f4dc..8c3e8575a7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -232,6 +232,7 @@ > [% IF LibrarySearchGroups %]<optgroup label="Libraries">[% END %] > > [% FOREACH library IN Branches.all( selected => opac_name ) %] >+ [% NEXT UNLESS library.public %] > [% IF library.selected %] > <option selected="selected" value="branch:[% library.branchcode | html %]">[% library.branchname | html %]</option> > [% ELSE %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >index b9dbe58e23..c669dcaf32 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >@@ -232,6 +232,7 @@ > <select name="limit" id="branchloop"> > <option value="">All libraries</option> > [% FOREACH BranchesLoo IN Branches.all( selected => opac_name ) %] >+ [% NEXT UNLESS BranchesLoo.public %] > [% IF BranchesLoo.selected %] > <option value="branch:[% BranchesLoo.branchcode | html %]" selected="selected">[% BranchesLoo.branchname | html %]</option> > [% ELSE %] >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31654
:
141123
|
141335
|
142514
| 143117 |
143118