Browse Source

Bug 7614: (follow-up) If patron's home library is not a pickup library, let them choose another one

This patch fixes an issue where patron is not allowed to place a hold in OPAC
while their home library is not a pickup library.

Instead, they should be presented with a list of other available pickup locations.

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
19.05.x
Lari Taskula 7 years ago
committed by Nick Clemens
parent
commit
3a69ec5e05
  1. 5
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
  2. 9
      opac/opac-reserve.pl

5
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt

@ -112,6 +112,11 @@
</li>
[% END %]
[% IF ( no_pickup_locations ) %]
<li id="no_pickup_locations">
None of the libraries are available for pickup location.
</li>
[% END %]
[% ELSE %]
[% IF ( none_available && multi_hold ) %]

9
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 );

Loading…
Cancel
Save