@@ -, +, @@
---
.../en/modules/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
@@ -244,19 +244,37 @@
[% ELSE %]
[% END %]
[% ELSIF view == 'report' %]
[% IF report.total_records == report.total_success %]
[% 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
+
+ New batch record modification
+ [% IF lists.count %]
+
+ Add modified records to the following list:
+
+ Select a list
+ [% FOREACH list IN lists %]
+ [% list.shelfname %]
+ [% END %]
+
+
+ [% END %]
+
+ [% END %]
[% ELSIF view == 'errors' %]
[% FOR error IN errors %]
[% IF error == 'no_template_defined' %]
@@ -374,6 +392,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';
--