Bug 18884: Advanced search on staff client, Availability limit not properly limiting
authorDavid Cook <dcook@prosentient.com.au>
Tue, 10 Oct 2017 01:05:16 +0000 (12:05 +1100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 27 Oct 2017 16:57:10 +0000 (13:57 -0300)
Patch applies and functions as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt

index 089680f..0102720 100644 (file)
@@ -1,9 +1,9 @@
 [% BLOCK options_for_libraries %]
     [% FOREACH l IN libraries %]
         [% IF l.selected %]
-            <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname %]</option>
+            <option value="[% prefix %][% l.branchcode | html %]" selected="selected">[% l.branchname %]</option>
         [% ELSE %]
-            <option value="[% l.branchcode | html %]">[% l.branchname |html %]</option>
+            <option value="[% prefix %][% l.branchcode | html %]">[% l.branchname |html %]</option>
         [% END%]
     [% END %]
 [% END %]
index 8425f59..b9f00d0 100644 (file)
         <p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop">
         <option value="">All libraries</option>
         [%# FIXME Should not we filter the libraries displayed? %]
-        [% PROCESS options_for_libraries libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %]
+        [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %]
         </select></p>
     <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
         [% IF ( searchdomainloop ) %]