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 658-664
if ( C4::Context->preference('OPACAcquisitionDetails' ) ) {
Link Here
|
658 |
}; |
658 |
}; |
659 |
} |
659 |
} |
660 |
|
660 |
|
661 |
my $allow_onshelf_holds; |
661 |
my $can_item_be_reserved = 0; |
662 |
my ( $itemloop_has_images, $otheritemloop_has_images ); |
662 |
my ( $itemloop_has_images, $otheritemloop_has_images ); |
663 |
if ( not $viewallitems and $items->count > $max_items_to_display ) { |
663 |
if ( not $viewallitems and $items->count > $max_items_to_display ) { |
664 |
$template->param( |
664 |
$template->param( |
Lines 682-690
else {
Link Here
|
682 |
$item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding; |
682 |
$item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding; |
683 |
$item_info->{home_library_info} = $opac_info_home->content if $opac_info_home; |
683 |
$item_info->{home_library_info} = $opac_info_home->content if $opac_info_home; |
684 |
|
684 |
|
685 |
$allow_onshelf_holds = Koha::CirculationRules->get_onshelfholds_policy( |
685 |
$can_item_be_reserved = $can_item_be_reserved || IsAvailableForItemLevelRequest($item, $patron, undef); |
686 |
{ item => $item, patron => $patron } ) |
|
|
687 |
unless $allow_onshelf_holds; |
688 |
|
686 |
|
689 |
# get collection code description, too |
687 |
# get collection code description, too |
690 |
my $ccode = $item->ccode; |
688 |
my $ccode = $item->ccode; |
Lines 759-765
else {
Link Here
|
759 |
} |
757 |
} |
760 |
} |
758 |
} |
761 |
|
759 |
|
762 |
if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { |
760 |
if( $can_item_be_reserved || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { |
763 |
$template->param( ReservableItems => 1 ); |
761 |
$template->param( ReservableItems => 1 ); |
764 |
} |
762 |
} |
765 |
|
763 |
|
766 |
- |
|
|