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

(-)a/C4/Reserves.pm (-1 / +1 lines)
Lines 391-397 sub CanBookBeReserved { Link Here
391
391
392
        $reservesallowed = ( $reservesallowed eq '' ) ? undef : $reservesallowed;
392
        $reservesallowed = ( $reservesallowed eq '' ) ? undef : $reservesallowed;
393
393
394
        my $count = $patron->holds->search(
394
        my $count = $patron->holds->count_holds(
395
            {
395
            {
396
                '-or' => [
396
                '-or' => [
397
                    { 'me.itemtype' => $params->{itemtype} },
397
                    { 'me.itemtype' => $params->{itemtype} },
(-)a/Koha/Holds.pm (-4 / +1 lines)
Lines 222-232 sub count_holds { Link Here
222
    $search_params->{hold_group_id} = undef;
222
    $search_params->{hold_group_id} = undef;
223
    my $holds_without_group_count = $self->search($search_params)->count();
223
    my $holds_without_group_count = $self->search($search_params)->count();
224
224
225
    $search_params = {
225
    $search_params->{hold_group_id} = { '!=', undef };
226
        hold_group_id => { '!=', undef },
227
    };
228
    my $hold_groups_count = $self->search( $search_params, { group_by => 'me.hold_group_id' } )->count();
226
    my $hold_groups_count = $self->search( $search_params, { group_by => 'me.hold_group_id' } )->count();
229
230
    return $holds_without_group_count + $hold_groups_count;
227
    return $holds_without_group_count + $hold_groups_count;
231
}
228
}
232
229
(-)a/circ/view_holdsqueue.pl (-10 lines)
Lines 55-70 if ($run_report) { Link Here
55
            locationslimit => $locationslimit
55
            locationslimit => $locationslimit
56
        }
56
        }
57
    );
57
    );
58
    for my $item (@$items) {
59
        my $related_hold = Koha::Holds->search(
60
            {
61
                borrowernumber => $item->{borrowernumber}, reservedate => $item->{reservedate},
62
                biblionumber   => $item->{biblionumber}
63
            },
64
            { order_by => 'reservedate' }
65
        )->next;
66
        $item->{hold_group_id} = $related_hold ? $related_hold->hold_group_id : undef;
67
    }
68
58
69
    $template->param(
59
    $template->param(
70
        branchlimit    => $branchlimit,
60
        branchlimit    => $branchlimit,
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc (-6 / +9 lines)
Lines 1-14 Link Here
1
<div id="hold-group-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="hold-group-modal-label">
1
<!-- Hold group modal -->
2
    <div class="modal-dialog" role="document">
2
<div class="modal" id="hold-group-modal" tabindex="-1" role="dialog" aria-labelledby="hold-group-modal-label">
3
    <div class="modal-dialog">
3
        <div class="modal-content">
4
        <div class="modal-content">
4
            <div class="modal-header">
5
            <div class="modal-header">
5
                <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
6
                <h1 class="modal-title" id="hold-group-modal-label">Hold group</h1>
6
                <h4 class="modal-title" id="hold-group-modal-label">Hold group</h4>
7
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-hidden="Close"></button>
7
            </div>
8
            </div>
8
            <div class="modal-body"> </div>
9
            <div class="modal-body"> </div>
10
            <!-- /.modal-body -->
9
            <div class="modal-footer">
11
            <div class="modal-footer">
10
                <button type="button" class="btn btn-default deny" data-dismiss="modal">Close</button>
12
                <button type="button" class="btn btn-default" data-bs-dismiss="modal">Close</button>
11
            </div> </div
13
            </div>
14
            <!-- /.modal-footer --> </div
12
        ><!-- /.modal-content --> </div
15
        ><!-- /.modal-content --> </div
13
    ><!-- /.modal-dialog --> </div
16
    ><!-- /.modal-dialog --> </div
14
><!-- /.modal -->
17
><!-- /.modal -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-2 / +2 lines)
Lines 243-249 Link Here
243
                                                            >
243
                                                            >
244
                                                            <em>or any available</em>
244
                                                            <em>or any available</em>
245
                                                        [% END %]
245
                                                        [% END %]
246
                                                        [% IF itemsloo.hold_group_id %]
246
                                                        [% # NOTE: This will never work as hold_group_id doesn't appear in the tmp_holdsqueue table %]
247
                                                        [% IF itemsloo.can('hold_group_id') && ( itemsloo.hold_group_id ) %]
247
                                                            <div>(part of a <a href="/cgi-bin/koha/reserve/hold-group.pl?hold_group_id=[% itemsloo.hold_group_id | uri %]" class="hold-group">hold group</a>)</div>
248
                                                            <div>(part of a <a href="/cgi-bin/koha/reserve/hold-group.pl?hold_group_id=[% itemsloo.hold_group_id | uri %]" class="hold-group">hold group</a>)</div>
248
                                                        [% END %]
249
                                                        [% END %]
249
                                                    </td>
250
                                                    </td>
250
- 

Return to bug 15516