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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt (-2 / +36 lines)
Lines 244-262 Link Here
244
                            </form> <!-- /#process -->
244
                            </form> <!-- /#process -->
245
                        [% ELSE %]
245
                        [% ELSE %]
246
                            <div class="dialog message">
246
                            <div class="dialog message">
247
                                No records were modified. <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
247
                                No records were modified. [% IF recordtype != 'biblio' %]<a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>[% END %]
248
                            </div>
248
                            </div>
249
                        [% END %]
249
                        [% END %]
250
                    [% ELSIF view == 'report' %]
250
                    [% ELSIF view == 'report' %]
251
                        [% IF report.total_records == report.total_success %]
251
                        [% IF report.total_records == report.total_success %]
252
                            <div class="dialog message">
252
                            <div class="dialog message">
253
                                All records have successfully been modified! <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
253
                                All records have successfully been modified! [% IF recordtype != 'biblio' %]<a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>[% END %]
254
                            </div>
254
                            </div>
255
                        [% ELSE %]
255
                        [% ELSE %]
256
                            <div class="dialog message">
256
                            <div class="dialog message">
257
                                [% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred. <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
257
                                [% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred. <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
258
                            </div>
258
                            </div>
259
                        [% END %]
259
                        [% END %]
260
261
                        [% IF recordtype == 'biblio' %]
262
                            <h3>Next steps</h3>
263
                            <ul>
264
                                <li><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
265
                                [% IF lists.count %]
266
                                <li>
267
                                    <label for="add_bibs_to_list">Add modified records to the following list: </label>
268
                                    <select name="add_bibs_to_list" id="add_bibs_to_list">
269
                                        <option value="">Select a list</option>
270
                                        [% FOREACH list IN lists %]
271
                                            <option class="shelf" value="[% list.shelfnumber %]">[% list.shelfname %]</option>
272
                                        [% END %]
273
                                    </select>
274
                                </li>
275
                                [% END %]
276
                            </ul>
277
                        [% END %]
260
                    [% ELSIF view == 'errors' %]
278
                    [% ELSIF view == 'errors' %]
261
                        [% FOR error IN errors %]
279
                        [% FOR error IN errors %]
262
                            [% IF error == 'no_template_defined' %]
280
                            [% IF error == 'no_template_defined' %]
Lines 374-379 Link Here
374
                $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> " + _("Loading") + "</div>");
392
                $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> " + _("Loading") + "</div>");
375
            });
393
            });
376
394
395
            $("#add_bibs_to_list").change(function(){
396
                var selected = $("#add_bibs_to_list").find("option:selected");
397
                if ( selected.attr("class") == "shelf" ){
398
                    var shelfnumber = selected.attr("value");
399
                    var bibs = new Array();
400
                    [% FOREACH message IN messages %]
401
                        [% IF message.code == 'biblio_modified' %]
402
                            bibs.push("biblionumber="+[% message.biblionumber %]);
403
                        [% END %]
404
                    [% END %]
405
                    var bibstring = bibs.join("&");
406
                    window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&'+bibstring, 'popup', 'width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes');
407
                    return false;
408
                }
409
            });
410
377
        });
411
        });
378
    </script>
412
    </script>
379
[% END %]
413
[% END %]
(-)a/tools/batch_record_modification.pl (-3 / +2 lines)
Lines 50-55 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ Link Here
50
        flagsrequired => { tools => 'records_batchmod' },
50
        flagsrequired => { tools => 'records_batchmod' },
51
});
51
});
52
52
53
$template->param( lists => scalar Koha::Virtualshelves->search([{ category => 1, owner => $loggedinuser }, { category => 2 }]) );
53
54
54
my $sessionID = $input->cookie("CGISESSID");
55
my $sessionID = $input->cookie("CGISESSID");
55
56
Lines 63-76 if ( $completedJobID ) { Link Here
63
        report => $report,
64
        report => $report,
64
        messages => $messages,
65
        messages => $messages,
65
        view => 'report',
66
        view => 'report',
67
        recordtype => $recordtype,
66
    );
68
    );
67
    output_html_with_http_headers $input, $cookie, $template->output;
69
    output_html_with_http_headers $input, $cookie, $template->output;
68
    $job->clear();
70
    $job->clear();
69
    exit;
71
    exit;
70
}
72
}
71
73
72
$template->param( lists => scalar Koha::Virtualshelves->search([{ category => 1, owner => $loggedinuser }, { category => 2 }]) );
73
74
my @templates = GetModificationTemplates( $mmtid );
74
my @templates = GetModificationTemplates( $mmtid );
75
unless ( @templates ) {
75
unless ( @templates ) {
76
    $op = 'error';
76
    $op = 'error';
77
- 

Return to bug 18127