View | Details | Raw Unified | Return to bug 34886
Collapse All | Expand All

(-)a/opac/opac-ISBDdetail.pl (-3 / +3 lines)
Lines 168-174 $template->param( Link Here
168
    subscriptionsnumber => $subscriptionsnumber,
168
    subscriptionsnumber => $subscriptionsnumber,
169
);
169
);
170
170
171
my $can_item_be_reserved = 0;
171
my $has_reservable_items = 0;
172
my $res = GetISBDView({
172
my $res = GetISBDView({
173
    'record'    => $record,
173
    'record'    => $record,
174
    'template'  => 'opac',
174
    'template'  => 'opac',
Lines 178-187 my $res = GetISBDView({ Link Here
178
my $items = $biblio->items;
178
my $items = $biblio->items;
179
while ( my $item = $items->next ) {
179
while ( my $item = $items->next ) {
180
180
181
    $can_item_be_reserved = $can_item_be_reserved || $patron && IsAvailableForItemLevelRequest( $item, $patron, undef );
181
    $has_reservable_items = $has_reservable_items || IsAvailableForItemLevelRequest( $item, $patron, undef );
182
}
182
}
183
183
184
if( $can_item_be_reserved || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
184
if( $has_reservable_items || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
185
    $template->param( ReservableItems => 1 );
185
    $template->param( ReservableItems => 1 );
186
}
186
}
187
187
(-)a/opac/opac-MARCdetail.pl (-3 / +3 lines)
Lines 136-149 $template->param( Link Here
136
) if $tagslib->{$bt_tag}->{$bt_subtag}->{hidden} <= 0 && # <=0 OPAC visible.
136
) if $tagslib->{$bt_tag}->{$bt_subtag}->{hidden} <= 0 && # <=0 OPAC visible.
137
     $tagslib->{$bt_tag}->{$bt_subtag}->{hidden} > -8;   # except -8;
137
     $tagslib->{$bt_tag}->{$bt_subtag}->{hidden} > -8;   # except -8;
138
138
139
my $can_item_be_reserved = 0;
139
my $has_reservable_items = 0;
140
$items->reset;
140
$items->reset;
141
141
142
while ( my $item = $items->next ) {
142
while ( my $item = $items->next ) {
143
    $can_item_be_reserved = $can_item_be_reserved || $patron && IsAvailableForItemLevelRequest( $item, $patron, undef );
143
    $has_reservable_items = $has_reservable_items || IsAvailableForItemLevelRequest( $item, $patron, undef );
144
}
144
}
145
145
146
if( $can_item_be_reserved || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
146
if( $has_reservable_items || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
147
    $template->param( ReservableItems => 1 );
147
    $template->param( ReservableItems => 1 );
148
}
148
}
149
149
(-)a/opac/opac-detail.pl (-5 / +4 lines)
Lines 658-664 if ( C4::Context->preference('OPACAcquisitionDetails' ) ) { Link Here
658
    };
658
    };
659
}
659
}
660
660
661
my $can_item_be_reserved = 0;
661
my $has_reservable_items = 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 683-691 else { Link Here
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
        if ( $patron ) {
685
        if ( $patron ) {
686
            $can_item_be_reserved = IsAvailableForItemLevelRequest($item, $patron, undef);
686
            $has_reservable_items = IsAvailableForItemLevelRequest($item, $patron, undef);
687
        } else {
687
        } else {
688
            $can_item_be_reserved =
688
            $has_reservable_items =
689
                Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => undef } );
689
                Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => undef } );
690
        }
690
        }
691
691
Lines 763-769 else { Link Here
763
    }
763
    }
764
}
764
}
765
765
766
if( $can_item_be_reserved || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
766
if( $has_reservable_items || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) {
767
    $template->param( ReservableItems => 1 );
767
    $template->param( ReservableItems => 1 );
768
}
768
}
769
769
770
- 

Return to bug 34886