Bug 7534: Display pickup locations instead of all libraries in request.pl
authorLari Taskula <lari.taskula@jns.fi>
Wed, 8 Feb 2017 14:45:23 +0000 (16:45 +0200)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 6 Sep 2018 17:27:06 +0000 (17:27 +0000)
This patch sets request.tt to use the list of pickup libraries instead
of every library in the system.

To test:
1. Go to cgi-bin/koha/admin/branches.pl
2. Configure one of your libraries to "Pickup location" => "No"
3. Go place a hold in intranet
4. See the provided "Pickup at" list
5. Observe the library that you configured is not present in the list
6. Place the hold
7. See list of existing holds on that biblio
8. See "Pickup library" column and observe your configured library is
   not included in the list

Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt

index 212c205..7d8276e 100644 (file)
         <li>
             <label for="pickup">Pickup at:</label>
             <select name="pickup" size="1" id="pickup">
-                [% PROCESS options_for_libraries libraries => Branches.all() %]
+                [% PROCESS options_for_libraries libraries => Branches.all({ search_params => { pickup_location => 1 } }) %]
             </select>
         </li>
 
             [% Branches.GetName(reserveloo.branchcode) | html %] <input type="hidden" name="pickup" value="[% reserveloo.branchcode | html %]" />
         [% ELSE %]
             <select name="pickup">
-                [% PROCESS options_for_libraries libraries => Branches.all( selected => reserveloo.branchcode ) %]
+                [% PROCESS options_for_libraries libraries => Branches.all({ search_params => { pickup_location => 1 }, selected => reserveloo.branchcode }) %]
             </select>
         [% END %]
     [% END %]