Lines 60-66
use C4::External::Syndetics qw(
Link Here
|
60 |
use C4::Members; |
60 |
use C4::Members; |
61 |
use C4::XSLT qw( XSLTParse4Display ); |
61 |
use C4::XSLT qw( XSLTParse4Display ); |
62 |
use C4::ShelfBrowser qw( GetNearbyItems ); |
62 |
use C4::ShelfBrowser qw( GetNearbyItems ); |
63 |
use C4::Reserves qw( GetReserveStatus ); |
63 |
use C4::Reserves qw( GetReserveStatus IsAvailableForItemLevelRequest ); |
64 |
use C4::Charset qw( SetUTF8Flag ); |
64 |
use C4::Charset qw( SetUTF8Flag ); |
65 |
use MARC::Field; |
65 |
use MARC::Field; |
66 |
use List::MoreUtils qw( any ); |
66 |
use List::MoreUtils qw( any ); |
Lines 662-668
if ( C4::Context->preference('OPACAcquisitionDetails' ) ) {
Link Here
|
662 |
}; |
662 |
}; |
663 |
} |
663 |
} |
664 |
|
664 |
|
665 |
my $allow_onshelf_holds; |
665 |
my $can_item_be_reserved = 0; |
666 |
my ( $itemloop_has_images, $otheritemloop_has_images ); |
666 |
my ( $itemloop_has_images, $otheritemloop_has_images ); |
667 |
if ( not $viewallitems and $items->count > $max_items_to_display ) { |
667 |
if ( not $viewallitems and $items->count > $max_items_to_display ) { |
668 |
$template->param( |
668 |
$template->param( |
Lines 686-694
else {
Link Here
|
686 |
$item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding; |
686 |
$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; |
687 |
$item_info->{home_library_info} = $opac_info_home->content if $opac_info_home; |
688 |
|
688 |
|
689 |
$allow_onshelf_holds = Koha::CirculationRules->get_onshelfholds_policy( |
689 |
$can_item_be_reserved = $can_item_be_reserved || IsAvailableForItemLevelRequest($item, $patron, undef); |
690 |
{ item => $item, patron => $patron } ) |
|
|
691 |
unless $allow_onshelf_holds; |
692 |
|
690 |
|
693 |
# get collection code description, too |
691 |
# get collection code description, too |
694 |
my $ccode = $item->ccode; |
692 |
my $ccode = $item->ccode; |
Lines 763-769
else {
Link Here
|
763 |
} |
761 |
} |
764 |
} |
762 |
} |
765 |
|
763 |
|
766 |
if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { |
764 |
if( $can_item_be_reserved || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { |
767 |
$template->param( ReservableItems => 1 ); |
765 |
$template->param( ReservableItems => 1 ); |
768 |
} |
766 |
} |
769 |
|
767 |
|
770 |
- |
|
|