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

(-)a/Koha/Items.pm (-1 / +14 lines)
Lines 47-53 Return the items of the set that are loanable Link Here
47
47
48
sub filter_by_for_loan {
48
sub filter_by_for_loan {
49
    my ($self) = @_;
49
    my ($self) = @_;
50
    return $self->search( { notforloan => [ 0, undef ] } );
50
    return $self->search( { notforloan => 0 } );
51
}
52
53
=head3 filter_by_for_hold
54
55
    my $filtered_items = $items->filter_by_for_hold;
56
57
Return the items of the set that are holdable
58
59
=cut
60
61
sub filter_by_for_hold {
62
    my ($self) = @_;
63
    return $self->search( { notforloan => { '<' => 1 } } ); # items with negative or zero notforloan value are holdable
51
}
64
}
52
65
53
=head3 filter_by_visible_in_opac
66
=head3 filter_by_visible_in_opac
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (-2 / +1 lines)
Lines 168-174 CAN_user_serials_create_subscription ) %] Link Here
168
[% IF ( CAN_user_reserveforothers ) %]
168
[% IF ( CAN_user_reserveforothers ) %]
169
    [%# biblio.items.filter_by_for_loan.count %]
169
    [%# biblio.items.filter_by_for_loan.count %]
170
    [% SET items = biblio.items %]
170
    [% SET items = biblio.items %]
171
    [% IF Context.Scalar(Context.Scalar(items, "filter_by_for_loan"), "count") %]
171
    [% IF Context.Scalar(Context.Scalar(items, "filter_by_for_hold"), "count") %]
172
        [% IF ( holdfor ) %]
172
        [% IF ( holdfor ) %]
173
            <div class="btn-group">
173
            <div class="btn-group">
174
                <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
174
                <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
175
- 

Return to bug 28286