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>
(cherry picked from commit 1c87129971)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Jacek Ablewicz 2016-08-17 18:42:37 +02:00 committed by Frédéric Demians
parent c364afd2aa
commit a1fdbf92da
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@
[% END %]
[% END %]
</select>
[% IF ( searchdomainloop ) %]
[% IF ( searchdomainloop && searchdomainloop.count > 0) %]
<p>OR</p>
<label for="categoryloop">Groups of libraries</label>
<select name="multibranchlimit" id="categoryloop">