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) to check if it's empty or not.
Created attachment 54545 [details] [review] 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.
Created attachment 54727 [details] [review] [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 <aleishaamohia@hotmail.com>
Created attachment 54760 [details] [review] 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>
Pushed to master for 16.11, thanks Jacek!
Pushed in 16.05. Will be in 16.05.04.