</form> <!-- /#process -->
[% ELSE %]
<div class="dialog message">
- No records were modified. <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
+ 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 %]
</div>
[% END %]
[% ELSIF view == 'report' %]
[% IF report.total_records == report.total_success %]
<div class="dialog message">
- 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>
+ 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 %]
</div>
[% ELSE %]
<div class="dialog message">
[% 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>
</div>
[% END %]
+
+ [% IF recordtype == 'biblio' %]
+ <h3>Next steps</h3>
+ <ul>
+ <li><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
+ [% IF lists.count %]
+ <li>
+ <label for="add_bibs_to_list">Add modified records to the following list: </label>
+ <select name="add_bibs_to_list" id="add_bibs_to_list">
+ <option value="">Select a list</option>
+ [% FOREACH list IN lists %]
+ <option class="shelf" value="[% list.shelfnumber %]">[% list.shelfname %]</option>
+ [% END %]
+ </select>
+ </li>
+ [% END %]
+ </ul>
+ [% END %]
[% ELSIF view == 'errors' %]
[% FOR error IN errors %]
[% IF error == 'no_template_defined' %]
$("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> " + _("Loading") + "</div>");
});
+ $("#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;
+ }
+ });
+
});
</script>
[% END %]
flagsrequired => { tools => 'records_batchmod' },
});
+$template->param( lists => scalar Koha::Virtualshelves->search([{ category => 1, owner => $loggedinuser }, { category => 2 }]) );
my $sessionID = $input->cookie("CGISESSID");
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';