@@ -, +, @@ --- .../tools/batch_record_modification.tt | 38 ++++++++++++++++++- tools/batch_record_modification.pl | 4 +- 2 files changed, 38 insertions(+), 4 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt @@ -245,19 +245,37 @@ [% ELSE %]
- No records were modified. New batch record modification + No records were modified. [% IF recordtype != 'biblio' %]New batch record modification[% END %]
[% END %] [% ELSIF view == 'report' %] [% IF report.total_records == report.total_success %]
- All records have successfully been modified! New batch record modification + All records have successfully been modified! [% IF recordtype != 'biblio' %]New batch record modification[% END %]
[% ELSE %]
[% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred. New batch record modification
[% END %] + + [% IF recordtype == 'biblio' %] +

Next steps

+ + [% END %] [% ELSIF view == 'errors' %] [% FOR error IN errors %] [% IF error == 'no_template_defined' %] @@ -376,6 +394,22 @@ $("#marcPreview .modal-body").html("
\"\" " + _("Loading") + "
"); }); + $("#add_bibs_to_list").change(function(){ + var selected = $("#add_bibs_to_list").find("option:selected"); + if ( selected.attr("class") == "shelf" ){ + var shelfnumber = selected.attr("value"); + var bibs = new Array(); + [% FOREACH message IN messages %] + [% IF message.code == 'biblio_modified' %] + bibs.push("biblionumber="+[% message.biblionumber %]); + [% END %] + [% END %] + var bibstring = bibs.join("&"); + window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&'+bibstring, 'popup', 'width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes'); + return false; + } + }); + }); [% END %] --- a/tools/batch_record_modification.pl +++ a/tools/batch_record_modification.pl @@ -50,6 +50,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ flagsrequired => { tools => 'records_batchmod' }, }); +$template->param( lists => scalar Koha::Virtualshelves->search([{ category => 1, owner => $loggedinuser }, { category => 2 }]) ); my $sessionID = $input->cookie("CGISESSID"); @@ -63,14 +64,13 @@ if ( $completedJobID ) { report => $report, messages => $messages, view => 'report', + recordtype => $recordtype, ); output_html_with_http_headers $input, $cookie, $template->output; $job->clear(); exit; } -$template->param( lists => scalar Koha::Virtualshelves->search([{ category => 1, owner => $loggedinuser }, { category => 2 }]) ); - my @templates = GetModificationTemplates( $mmtid ); unless ( @templates ) { $op = 'error'; --