Lines 709-714
if ( C4::Context->preference('OPACAcquisitionDetails' ) ) {
Link Here
|
709 |
} |
709 |
} |
710 |
|
710 |
|
711 |
my $allow_onshelf_holds; |
711 |
my $allow_onshelf_holds; |
|
|
712 |
my ( $itemloop_has_images, $otheritemloop_has_images ); |
712 |
if ( not $viewallitems and @items > $max_items_to_display ) { |
713 |
if ( not $viewallitems and @items > $max_items_to_display ) { |
713 |
$template->param( |
714 |
$template->param( |
714 |
too_many_items => 1, |
715 |
too_many_items => 1, |
Lines 762-776
if ( not $viewallitems and @items > $max_items_to_display ) {
Link Here
|
762 |
if grep { $_ eq $itm->{itemnumber} } @itemnumbers_on_order; |
763 |
if grep { $_ eq $itm->{itemnumber} } @itemnumbers_on_order; |
763 |
} |
764 |
} |
764 |
|
765 |
|
|
|
766 |
if ( C4::Context->preference("OPACLocalCoverImages") == 1 ) { |
767 |
$itm->{imagenumber} = |
768 |
C4::Images::GetImageForItem( $itm->{itemnumber} ); |
769 |
} |
770 |
|
765 |
my $itembranch = $itm->{$separatebranch}; |
771 |
my $itembranch = $itm->{$separatebranch}; |
766 |
if ($currentbranch and C4::Context->preference('OpacSeparateHoldings')) { |
772 |
if ($currentbranch and C4::Context->preference('OpacSeparateHoldings')) { |
767 |
if ($itembranch and $itembranch eq $currentbranch) { |
773 |
if ($itembranch and $itembranch eq $currentbranch) { |
768 |
push @itemloop, $itm; |
774 |
push @itemloop, $itm; |
|
|
775 |
$itemloop_has_images++ if $itm->{imagenumber}; |
769 |
} else { |
776 |
} else { |
770 |
push @otheritemloop, $itm; |
777 |
push @otheritemloop, $itm; |
|
|
778 |
$otheritemloop_has_images++ if $itm->{imagenumber}; |
771 |
} |
779 |
} |
772 |
} else { |
780 |
} else { |
773 |
push @itemloop, $itm; |
781 |
push @itemloop, $itm; |
|
|
782 |
$itemloop_has_images++ if $itm->{imagenumber}; |
774 |
} |
783 |
} |
775 |
} |
784 |
} |
776 |
} |
785 |
} |
Lines 779-784
if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_item
Link Here
|
779 |
$template->param( ReservableItems => 1 ); |
788 |
$template->param( ReservableItems => 1 ); |
780 |
} |
789 |
} |
781 |
|
790 |
|
|
|
791 |
$template->param( |
792 |
itemloop_has_images => $itemloop_has_images, |
793 |
otheritemloop_has_images => $otheritemloop_has_images, |
794 |
); |
795 |
|
782 |
# Display only one tab if one items list is empty |
796 |
# Display only one tab if one items list is empty |
783 |
if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { |
797 |
if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { |
784 |
$template->param(SeparateHoldings => 0); |
798 |
$template->param(SeparateHoldings => 0); |