Lines 71-76
for ( C4::Context->preference("OPACShowHoldQueueDetails") ) {
Link Here
|
71 |
} |
71 |
} |
72 |
|
72 |
|
73 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
73 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
|
|
74 |
my $category = $patron->category; |
75 |
# no OpacHiddenItems rules used if category is excepted |
76 |
my $item_hide_rules = |
77 |
( $category->override_hidden_items ) |
78 |
? {} |
79 |
: C4::Context->yaml_preference('OpacHiddenItems'); |
74 |
|
80 |
|
75 |
my $can_place_hold_if_available_at_pickup = C4::Context->preference('OPACHoldsIfAvailableAtPickup'); |
81 |
my $can_place_hold_if_available_at_pickup = C4::Context->preference('OPACHoldsIfAvailableAtPickup'); |
76 |
unless ( $can_place_hold_if_available_at_pickup ) { |
82 |
unless ( $can_place_hold_if_available_at_pickup ) { |
Lines 461-466
foreach my $biblioNum (@biblionumbers) {
Link Here
|
461 |
my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode }); |
467 |
my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode }); |
462 |
my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs }; |
468 |
my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs }; |
463 |
|
469 |
|
|
|
470 |
my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { rules => $item_hide_rules } ) }; |
471 |
|
472 |
# Only keep the items that are visible in the opac (i.e. those in %visible_items) |
473 |
# FIXME: We should get rid of itemInfos altogether and use $visible_items |
474 |
$biblioData->{itemInfos} = [ grep { $visible_items->{ $_->{itemnumber} } } @{ $biblioData->{itemInfos} } ]; |
475 |
|
464 |
$biblioLoopIter{itemLoop} = []; |
476 |
$biblioLoopIter{itemLoop} = []; |
465 |
my $numCopiesAvailable = 0; |
477 |
my $numCopiesAvailable = 0; |
466 |
my $numCopiesOPACAvailable = 0; |
478 |
my $numCopiesOPACAvailable = 0; |
467 |
- |
|
|