@@ -, +, @@ --- admin/background_jobs.pl | 4 ++- .../prog/en/modules/admin/background_jobs.tt | 41 ++++++++++++++-------- .../en/modules/tools/batch_record_modification.tt | 17 --------- tools/batch_record_modification.pl | 2 -- 4 files changed, 29 insertions(+), 35 deletions(-) --- a/admin/background_jobs.pl +++ a/admin/background_jobs.pl @@ -24,8 +24,8 @@ use C4::Context; use C4::Auth; use C4::Output; -use Koha::BackgroundJob; use Koha::BackgroundJobs; +use Koha::Virtualshelves; my $input = new CGI; my $op = $input->param('op') || 'list'; @@ -50,6 +50,8 @@ if ( $op eq 'view' ) { $template->param( job => $job, ); + $template->param( lists => scalar Koha::Virtualshelves->search([{ category => 1, owner => $loggedinuser }, { category => 2 }]) ) + if $job->type eq 'batch_biblio_record_modification'; } else { $op = 'list'; } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt @@ -51,6 +51,16 @@ [% IF report.total_records == report.total_success %]
[% ELSE %] [% END %] @@ -224,6 +219,22 @@ "iDisplayLength": 10, "sPaginationType": "full_numbers" })); + + $("#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 job.messages %] + [% IF message.code == 'biblio_modified' %] + bibs.push("biblionumber="+[% message.biblionumber | html %]); + [% 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/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 @@ -363,23 +363,6 @@ $("#marcPreviewLabel").html(""); $("#marcPreview .modal-body").html("