@@ -, +, @@ one or more are un-holdable - All titles are available to be placed on hold You should see no onscreen warnings, and all titles should be selectable on the place hold screen. A "Place hold" button should appear at the bottom. - Some titles can be placed on hold, some cannot The titles which can be placed on hold should be selectable. Titles which cannot be placed on hold should show a warning message. A "Place hold" button should appear at the bottom. - No titles can be placed on hold "Sorry, none of these items can be placed on hold." should appear at the top of the page. All titles should appear with warning messages. There should be no "Place hold" button. --- opac/opac-reserve.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/opac/opac-reserve.pl +++ a/opac/opac-reserve.pl @@ -350,7 +350,7 @@ my $notforloan_label_of = get_notforloan_label_of(); my $biblioLoop = []; my $numBibsAvailable = 0; my $itemdata_enumchron = 0; -my $anyholdable; +my $anyholdable = 0; my $itemLevelTypes = C4::Context->preference('item-level_itypes'); $template->param('item_level_itypes' => $itemLevelTypes); @@ -527,21 +527,20 @@ foreach my $biblioNum (@biblionumbers) { $numBibsAvailable++; $biblioLoopIter{bib_available} = 1; $biblioLoopIter{holdable} = 1; - $anyholdable = 1; } if ($biblioLoopIter{already_reserved}) { $biblioLoopIter{holdable} = undef; - $anyholdable = undef; } if(not CanBookBeReserved($borrowernumber,$biblioNum)){ $biblioLoopIter{holdable} = undef; - $anyholdable = undef; } + if( $biblioLoopIter{holdable} ){ $anyholdable = 1; } + push @$biblioLoop, \%biblioLoopIter; } -if ( $numBibsAvailable == 0 || !$anyholdable) { +if ( $numBibsAvailable == 0 || $anyholdable == 0) { $template->param( none_available => 1 ); } --