Lines 662-668
if ( C4::Context->preference('OPACAcquisitionDetails' ) ) {
Link Here
|
662 |
}; |
662 |
}; |
663 |
} |
663 |
} |
664 |
|
664 |
|
665 |
my $can_item_be_reserved = 0; |
665 |
# Count the number of items that allow holds |
|
|
666 |
my $holdable_items = $biblio->items->filter_by_for_hold->count; |
667 |
# If we have a patron and there are no holdable items - we set to no |
668 |
# If we have a patron and there are holdable items we set to no - and we need to check each item specifically |
669 |
# If we don't have a patron, then holdable items determines holdability |
670 |
my $can_holds_be_placed = $patron && $holdable_items ? 0 : $holdable_items; |
671 |
|
666 |
my ( $itemloop_has_images, $otheritemloop_has_images ); |
672 |
my ( $itemloop_has_images, $otheritemloop_has_images ); |
667 |
if ( not $viewallitems and $items->count > $max_items_to_display ) { |
673 |
if ( not $viewallitems and $items->count > $max_items_to_display ) { |
668 |
$template->param( |
674 |
$template->param( |
Lines 686-692
else {
Link Here
|
686 |
$item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding; |
692 |
$item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding; |
687 |
$item_info->{home_library_info} = $opac_info_home->content if $opac_info_home; |
693 |
$item_info->{home_library_info} = $opac_info_home->content if $opac_info_home; |
688 |
|
694 |
|
689 |
$can_item_be_reserved = $can_item_be_reserved || $patron && IsAvailableForItemLevelRequest($item, $patron, undef); |
695 |
# We only need to check if we haven't determined holds can be place, and there are items that can |
|
|
696 |
# be held, and we have a patron to determine holdability |
697 |
if( !$can_holds_be_placed && $holdable_items && $patron ){ |
698 |
$can_holds_be_placed = IsAvailableForItemLevelRequest($item, $patron, undef); |
699 |
} |
690 |
|
700 |
|
691 |
# get collection code description, too |
701 |
# get collection code description, too |
692 |
my $ccode = $item->ccode; |
702 |
my $ccode = $item->ccode; |
Lines 762-770
else {
Link Here
|
762 |
} |
772 |
} |
763 |
} |
773 |
} |
764 |
|
774 |
|
765 |
if( $can_item_be_reserved || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { |
775 |
$template->param( ReservableItems => $can_holds_be_placed ); |
766 |
$template->param( ReservableItems => 1 ); |
|
|
767 |
} |
768 |
|
776 |
|
769 |
$template->param( |
777 |
$template->param( |
770 |
itemloop_has_images => $itemloop_has_images, |
778 |
itemloop_has_images => $itemloop_has_images, |
Lines 792-801
if( C4::Context->preference('ArticleRequests') ) {
Link Here
|
792 |
$template->param( artreqpossible => $artreqpossible ); |
800 |
$template->param( artreqpossible => $artreqpossible ); |
793 |
} |
801 |
} |
794 |
|
802 |
|
795 |
my $norequests = ! $biblio->items->filter_by_for_hold->count; |
|
|
796 |
$template->param( |
803 |
$template->param( |
797 |
MARCNOTES => $marcnotesarray, |
804 |
MARCNOTES => $marcnotesarray, |
798 |
norequests => $norequests, |
|
|
799 |
itemdata_ccode => $itemfields{ccode}, |
805 |
itemdata_ccode => $itemfields{ccode}, |
800 |
itemdata_materials => $itemfields{materials}, |
806 |
itemdata_materials => $itemfields{materials}, |
801 |
itemdata_enumchron => $itemfields{enumchron}, |
807 |
itemdata_enumchron => $itemfields{enumchron}, |
802 |
- |
|
|