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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc (+16 lines)
Lines 64-69 Link Here
64
                    [% IF HOLD.item_level_hold %]
64
                    [% IF HOLD.item_level_hold %]
65
                        <p class="hint">Item on hold: [% HOLD.item.barcode | html %]</p>
65
                        <p class="hint">Item on hold: [% HOLD.item.barcode | html %]</p>
66
                    [% END %]
66
                    [% END %]
67
                    [% IF HOLD.hold_group_id %]
68
                        <div class="group_hold">
69
                            <span class="hint">(part of a hold group)</span>
70
                            <div class="group_hold_list" style="display:none">
71
                            [% group_holds = HOLD.hold_group.holds %]
72
                            [% IF ( group_holds.count ) %]
73
                                <span class="hint">Containing the following:</span>
74
                                <ul>
75
                                [% FOREACH hg_member IN group_holds %]
76
                                    <li>[% INCLUDE 'biblio-title.inc' biblio=hg_member.biblio link=>1 %]</li>
77
                                [% END %]
78
                                </ul>
79
                            [% END %]
80
                            </div>
81
                        </div>
82
                    [% END %]
67
                </td>
83
                </td>
68
                <td class="reservedate" data-order="[% HOLD.reservedate | html %]">
84
                <td class="reservedate" data-order="[% HOLD.reservedate | html %]">
69
                    [% HOLD.reservedate | $KohaDates %]
85
                    [% HOLD.reservedate | $KohaDates %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt (+10 lines)
Lines 145-150 Link Here
145
145
146
            <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
146
            <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
147
                <legend class="sr-only">Hold requests</legend>
147
                <legend class="sr-only">Hold requests</legend>
148
                <div id="hold_group">
149
                    <fieldset class="rows">
150
                        <ul>
151
                            <li>
152
                                <label for="add_to_hold_group_control">Treat as hold group (next available item fulfills all holds):</label>
153
                                <input type="checkbox" id="add_to_hold_group_control" name="add_to_hold_group" value="add_to_hold_group"/>
154
                            </li>
155
                        </ul>
156
                    </fieldset>
157
                </div>
148
                <input type="hidden" name="place_reserve" value="1"/>
158
                <input type="hidden" name="place_reserve" value="1"/>
149
                <!-- These values are set dynamically by js -->
159
                <!-- These values are set dynamically by js -->
150
                    <input type="hidden" name="biblionumbers" id="biblionumbers"/>
160
                    <input type="hidden" name="biblionumbers" id="biblionumbers"/>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-1 / +2 lines)
Lines 287-293 Link Here
287
287
288
                            [% IF ( RESERVES.count ) %]
288
                            [% IF ( RESERVES.count ) %]
289
                                [% WRAPPER tab_item tabname= "opac-user-holds" %]
289
                                [% WRAPPER tab_item tabname= "opac-user-holds" %]
290
                                    <span>Holds ([% RESERVES.count | html %])</span>
290
                                    <span>Holds ([% reserves_count | html %])</span>
291
                                [% END %]
291
                                [% END %]
292
                            [% END %]
292
                            [% END %]
293
                            [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
293
                            [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
Lines 1467-1470 Link Here
1467
    });
1467
    });
1468
    </script>
1468
    </script>
1469
    [% END %]
1469
    [% END %]
1470
    [% Asset.js("js/holds.js") | $raw %]
1470
[% END %]
1471
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-1 / +1 lines)
Lines 616-621 Link Here
616
    });
616
    });
617
617
618
    </script>
618
    </script>
619
619
    [% Asset.js("js/holds.js") | $raw %]
620
    [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]
620
    [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]
621
[% END %]
621
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/holds.js (+5 lines)
Line 0 Link Here
1
$(document).ready(function(){
2
    $("div.group_hold").click(function(){
3
        $(this).find("div.group_hold_list").toggle();
4
    });
5
});
(-)a/opac/opac-reserve.pl (-1 / +11 lines)
Lines 180-186 $template->param( branch => $branch ); Link Here
180
#
180
#
181
#
181
#
182
if ( $query->param('place_reserve') ) {
182
if ( $query->param('place_reserve') ) {
183
    my $reserve_cnt = 0;
183
    my $add_to_hold_group = $query->param('add_to_hold_group');
184
    my $reserve_cnt       = 0;
184
    if ($maxreserves) {
185
    if ($maxreserves) {
185
        $reserve_cnt = $patron->holds->count_holds;
186
        $reserve_cnt = $patron->holds->count_holds;
186
    }
187
    }
Lines 213-218 if ( $query->param('place_reserve') ) { Link Here
213
    }
214
    }
214
215
215
    my @failed_holds;
216
    my @failed_holds;
217
    my $hold_group;
216
    while (@selectedItems) {
218
    while (@selectedItems) {
217
        my $biblioNum = shift(@selectedItems);
219
        my $biblioNum = shift(@selectedItems);
218
        my $itemNum   = shift(@selectedItems);
220
        my $itemNum   = shift(@selectedItems);
Lines 306-311 if ( $query->param('place_reserve') ) { Link Here
306
308
307
        # Here we actually do the reserveration. Stage 3.
309
        # Here we actually do the reserveration. Stage 3.
308
        if ($canreserve) {
310
        if ($canreserve) {
311
            if ($add_to_hold_group) {
312
313
                #NOTE: We wait to create a hold group until we know that we can actually place a hold/reserve
314
                if ( !$hold_group ) {
315
                    $hold_group = Koha::HoldGroup->new->store;
316
                }
317
            }
309
            my $reserve_id = AddReserve(
318
            my $reserve_id = AddReserve(
310
                {
319
                {
311
                    branchcode       => $branch,
320
                    branchcode       => $branch,
Lines 320-325 if ( $query->param('place_reserve') ) { Link Here
320
                    found            => undef,
329
                    found            => undef,
321
                    itemtype         => $itemtype,
330
                    itemtype         => $itemtype,
322
                    item_group_id    => $item_group_id,
331
                    item_group_id    => $item_group_id,
332
                    hold_group_id    => $hold_group ? $hold_group->id : undef,
323
                }
333
                }
324
            );
334
            );
325
            if( $reserve_id ){
335
            if( $reserve_id ){
(-)a/opac/opac-user.pl (-1 / +1 lines)
Lines 339-344 my $reserves = $patron->holds->filter_out_has_cancellation_requests; Link Here
339
339
340
$template->param(
340
$template->param(
341
    RESERVES       => $reserves,
341
    RESERVES       => $reserves,
342
    reserves_count => $reserves->count_holds,
342
    showpriority   => $show_priority,
343
    showpriority   => $show_priority,
343
);
344
);
344
345
345
- 

Return to bug 15516