Bug 26999: Make 'Any library' translatable when placing a hold

This patch makes the 'Any library' string translatable, by converting it
into a flag and using it accordingly on the request.tt template.

To test:
1. Have the 'Hold pickup library match' set to 'any library' on the
   circultation rules.
2. Open the page to place a hold on a biblio with some items
=> SUCCESS: The item says 'Any library' on the 'Allowed pickup
locations' column.
3. Apply this patch
4. Repeat 2
=> SUCCESS: No behavior change
=> SUCCESS: The string is on the template
5. Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 13bb39f4c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d863a6dfc)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
Tomas Cohen Arazi 2021-03-15 08:05:02 -03:00 committed by Andrew Fuerste-Henry
parent 684db0a795
commit a0ef98df26
2 changed files with 5 additions and 2 deletions

View File

@ -677,7 +677,11 @@
[% END %]
</td>
<td>
[% IF itemloo.any_pickup_location %]
Any library
[% ELSE %]
[% itemloo.pickup_locations | html %]
[% END %]
</td>
</tr>
[% END # / UNLESS itemloo.hide %]

View File

@ -574,8 +574,7 @@ foreach my $biblionumber (@biblionumbers) {
$item->{available} = 1;
$num_available++;
if($branchitemrule->{'hold_fulfillment_policy'} eq 'any' ) {
$item->{pickup_locations} = 'Any library';
$item->{pickup_locations_code} = 'all';
$item->{any_pickup_location} = 1;
} else {
my $arr_locations = Koha::Items->find($itemnumber)
->pickup_locations( { patron => $patron } )->as_list();