From 8b55d9f34bb90d4de3ea8acb2c8436b2695a0a6e Mon Sep 17 00:00:00 2001 From: Jacek Ablewicz Date: Wed, 17 Aug 2016 18:42:37 +0200 Subject: [PATCH] [SIGNED-OF] Bug 17142 - Don't show library group selection in advanced search if groups are not defined 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 --- 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 28591bd..c77742b 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