From a943257b36830b9016e312b0feb7d0ac7edbe035 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 --- 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 5dfff18595..02c1895fbb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -685,7 +685,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.11.0