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>
(cherry picked from commit 3a69ec5e05)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
053a07734c
commit
cd95cea044
|
|
@ -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 ) %]
|
||||
|
|
|
|||
|
|
@ -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…
Reference in New Issue