Bug 17142 - Don't show library group selection in advanced search if groups are not...
authorJacek Ablewicz <abl@biblos.pk.edu.pl>
Wed, 17 Aug 2016 16:42:37 +0000 (18:42 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 2 Sep 2016 14:21:02 +0000 (14:21 +0000)
commit1c87129971ddcd4289c42083a6005638b0d5370d
treeb9e683d17477008c8606d8f03caf79637504d38b
parentf17b491f357267aa037480593158b13c426051ab
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 <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt