@@ -, +, @@ pickup library, let them choose another one --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 5 +++++ opac/opac-reserve.pl | 9 +++++++++ 2 files changed, 14 insertions(+) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -112,6 +112,11 @@ [% END %] + [% IF ( no_pickup_locations ) %] +
  • + None of the libraries are available for pickup location. +
  • + [% END %] [% ELSE %] [% IF ( none_available && multi_hold ) %] --- a/opac/opac-reserve.pl +++ a/opac/opac-reserve.pl @@ -385,6 +385,7 @@ my $itemdata_enumchron = 0; my $itemdata_ccode = 0; my $anyholdable = 0; my $itemLevelTypes = C4::Context->preference('item-level_itypes'); +my $pickup_locations = Koha::Libraries->search({ pickup_location => 1 }); $template->param('item_level_itypes' => $itemLevelTypes); foreach my $biblioNum (@biblionumbers) { @@ -614,6 +615,14 @@ foreach my $biblioNum (@biblionumbers) { $anyholdable = 1 if $biblioLoopIter{holdable}; } +unless ($pickup_locations->count) { + $numBibsAvailable = 0; + $anyholdable = 0; + $template->param( + message => 1, + no_pickup_locations => 1 + ); +} if ( $numBibsAvailable == 0 || $anyholdable == 0) { $template->param( none_available => 1 ); --