From a1fdbf92da71e0a4348bcff682b26576f88ccc38 Mon Sep 17 00:00:00 2001 From: Jacek Ablewicz Date: Wed, 17 Aug 2016 18:42:37 +0200 Subject: [PATCH] Bug 17142 - Don't show library group selection in advanced search if groups are not defined MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Even if library groups/search domains are not defined in the system, (empty) select for "Groups of libraries" under "Location and availability" section in OPAC advanced search is still visible; it shouldn't. Side effect of Bug 15295 - 'searchdomainloop' variable in the template is now an object, it needs a different kind of statement (.count) for checking if it's empty or not. To test: 1) apply patch 2) when there are no groups of libraries defined in Administration -> Libraries and Groups, "Groups of libraries" selection should be no longer visible in OPAC adavanced search page 3) add library group or two: "Groups of libraries" selection should reappear. Signed-off-by: Aleisha Amohia Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 1c87129971ddcd4289c42083a6005638b0d5370d) Signed-off-by: Frédéric Demians --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 28591bd7d4..c77742b13a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt @@ -222,7 +222,7 @@ [% END %] [% END %] - [% IF ( searchdomainloop ) %] + [% IF ( searchdomainloop && searchdomainloop.count > 0) %]

OR