From 1d863a6dfc71f7193f533c06c2906de7d17bacfb Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 15 Mar 2021 08:05:02 -0300 Subject: [PATCH] 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 Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart (cherry picked from commit 13bb39f4c670d72686dd6b76cc0757c2f07b04d5) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 4 ++++ reserve/request.pl | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 4c73199609..5ea6f13eb2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -684,7 +684,11 @@ [% END %] + [% IF itemloo.any_pickup_location %] + Any library + [% ELSE %] [% itemloo.pickup_locations | html %] + [% END %] [% END # / UNLESS itemloo.hide %] diff --git a/reserve/request.pl b/reserve/request.pl index 1751a0aa92..24255e8f5d 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -569,8 +569,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(); -- 2.39.5