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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (+27 lines)
Lines 1024-1029 Link Here
1024
                                    [% END %]
1024
                                    [% END %]
1025
                                </form>
1025
                                </form>
1026
1026
1027
                                <form method="POST" action="/cgi-bin/koha/tools/batch_extend_due_dates.pl" id="batch_extend_due_dates" target="_blank">
1028
                                    [% INCLUDE 'csrf-token.inc' %]
1029
                                    <input type="hidden" name="op" value="cud-form" />
1030
                                    [% FOREACH result IN results %]
1031
                                        [% FOREACH cells IN result.cells %]
1032
                                            [% place = loop.index %]
1033
                                            [% NEXT UNLESS cells.cell.match('^(\d+)$') %]
1034
                                            [% IF header_row.$place.cell == 'itemnumber' || header_types.item(header_row.$place.cell) == 'itemnumber' %]
1035
                                                [% SET batch_itemnumbers = 1 %]
1036
                                                [% SET header_row.$place.has_itemnumbers = 1 %]
1037
                                                <input type="hidden" name="[% header_row.$place.cell | html %]" value="[% cells.cell | html %]" />
1038
                                            [% END %]
1039
                                        [% END %]
1040
                                    [% END %]
1041
                                </form>
1042
1027
                                <form method="get" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl" id="batch_add_to_list" target="_blank">
1043
                                <form method="get" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl" id="batch_add_to_list" target="_blank">
1028
                                    [% FOREACH result IN results %]
1044
                                    [% FOREACH result IN results %]
1029
                                        [% FOREACH cells IN result.cells %]
1045
                                        [% FOREACH cells IN result.cells %]
Lines 1214-1219 Link Here
1214
                                                                    >Batch item deletion</a
1230
                                                                    >Batch item deletion</a
1215
                                                                >
1231
                                                                >
1216
                                                            </li>
1232
                                                            </li>
1233
                                                            <li>
1234
                                                                <a
1235
                                                                    href="#"
1236
                                                                    data-submit="batch_extend_due_dates"
1237
                                                                    data-bs-toggle="tooltip"
1238
                                                                    data-bs-placement="right"
1239
                                                                    title="Send visible items to batch extend due dates"
1240
                                                                    class="dropdown-item batch_op send_to_extend_due"
1241
                                                                    >Batch extend due dates</a
1242
                                                                >
1243
                                                            </li>
1217
                                                        [% END %]
1244
                                                        [% END %]
1218
                                                        [% IF header_ro.cell == 'reserve_id' || header_types.item( header_ro.cell ) == 'reserve_id' %]
1245
                                                        [% IF header_ro.cell == 'reserve_id' || header_types.item( header_ro.cell ) == 'reserve_id' %]
1219
                                                            <li class="dropdown-header">Hold records</li>
1246
                                                            <li class="dropdown-header">Hold records</li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt (-1 / +6 lines)
Lines 126-132 Link Here
126
                <ol>
126
                <ol>
127
                    <li>
127
                    <li>
128
                        <label for="barcodelist">Barcode list (one barcode per line): </label>
128
                        <label for="barcodelist">Barcode list (one barcode per line): </label>
129
                        <textarea rows="10" cols="30" id="barcodelist" name="barcodelist"></textarea>
129
                        <textarea rows="10" cols="30" id="barcodelist" name="barcodelist">
130
                            [%- FOREACH item IN items %]
131
                                [%- item.barcode -%]
132
                            [% END -%]
133
                        </textarea
134
                        >
130
                    </li>
135
                    </li>
131
                </ol>
136
                </ol>
132
            </fieldset>
137
            </fieldset>
(-)a/tools/batch_extend_due_dates.pl (-2 / +10 lines)
Lines 46-53 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
46
46
47
my @issue_ids;
47
my @issue_ids;
48
48
49
if ( $op eq 'form' ) {
49
if ( $op eq 'form' || $op eq 'cud-form' ) {
50
    $template->param( view => 'form', );
50
    $template->param( view => 'form', );
51
52
    my @list = $input->multi_param('itemnumber');
53
    if (@list) {
54
        my $items_rs = Koha::Items->search( { itemnumber => { -in => \@list } } );
55
56
        my @items = $items_rs->as_list;
57
        $template->param( items => \@items, );
58
    }
59
51
} elsif ( $op eq 'cud-list' ) {
60
} elsif ( $op eq 'cud-list' ) {
52
61
53
    my @categorycodes     = $input->multi_param('categorycodes');
62
    my @categorycodes     = $input->multi_param('categorycodes');
54
- 

Return to bug 27248