+ [% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred.
+ [% IF job.status == 'cancelled' %]The job has been cancelled before it finished.[% END %]
+ New batch record modification
+
+ [% END %]
+ [% END %]
+[% END %]
+
+[% BLOCK detail %]
+ [% FOR m IN job.messages %]
+
+ [% IF m.type == 'success' %]
+
+ [% ELSIF m.type == 'warning' %]
+
+ [% ELSIF m.type == 'error' %]
+
+ [% END %]
+ [% SWITCH m.code %]
+ [% CASE 'authority_not_modified' %]
+ Authority record [% m.authid | html %] has not been modified. An error occurred on modifying it[% IF m.error %] ([% m.error %])[% END %].
+ [% CASE 'authority_modified' %]
+ Authority record [% m.authid | html %] has successfully been modified..
+ [% END %]
+
+ [% END %]
+[% END %]
+
+[% BLOCK js %]
+[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/batch_biblio_record_deletion.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/batch_biblio_record_deletion.inc
@@ -0,0 +1,49 @@
+[% BLOCK report %]
+ [% SET report = job.report %]
+ [% IF report %]
+ [% IF report.total_records == report.total_success %]
+
+ All records have been deleted successfully!
+
+ [% ELSIF report.total_success == 0 %]
+
+ No record has been deleted. An error occurred.
+
+ [% ELSE %]
+
+ [% report.total_success | html %] / [% report.total_records | html %] records have been deleted successfully but some errors occurred.
+
+ [% END %]
+ [% END %]
+[% END %]
+
+[% BLOCK detail %]
+ [% FOR m IN job.messages %]
+
+ [% IF m.type == 'success' %]
+
+ [% ELSIF m.type == 'warning' %]
+
+ [% ELSIF m.type == 'error' %]
+
+ [% END %]
+ [% SWITCH m.code %]
+ [% CASE 'biblio_not_exists' %]
+ The biblionumber [% m.biblionumber | html %] does not exist in the database.
+ [% CASE 'item_issued' %]
+ At least one item is checked out on bibliographic record [% m.biblionumber | html %].
+ [% CASE 'reserve_not_cancelled' %]
+ Bibliographic record [% m.biblionumber | html %] was not deleted. A hold could not be canceled (reserve_id [% m.reserve_id | html %]).
+ [% CASE 'item_not_deleted' %]
+ The bibliographic record [% m.biblionumber | html %] was not deleted. An error was encountered when deleting an item (itemnumber [% m.itemnumber | html %]).
+ [% CASE 'biblio_not_deleted' %]
+ Bibliographic record [% m.biblionumber | html %] was not deleted. An error occurred.
+ [% CASE 'biblio_deleted' %]
+ Bibliographic record [% m.biblionumber | html %] has been deleted successfully.
+ [% END %]
+
+ [% END %]
+[% END %]
+
+[% BLOCK js %]
+[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/batch_biblio_record_modification.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/batch_biblio_record_modification.inc
@@ -0,0 +1,64 @@
+[% BLOCK report %]
+ [% SET report = job.report %]
+ [% IF report %]
+ [% IF report.total_records == report.total_success %]
+
+ All records have successfully been modified! New batch record modification
+ [% IF lists.count %]
+
+ Add modified records to the following list:
+
+ [% END %]
+
+ [% ELSE %]
+
+ [% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred.
+ [% IF job.status == 'cancelled' %]The job has been cancelled before it finished.[% END %]
+ New batch record modification
+
+ [% END %]
+ [% END %]
+[% END %]
+
+[% BLOCK detail %]
+ [% FOR m IN job.messages %]
+
+ [% IF m.type == 'success' %]
+
+ [% ELSIF m.type == 'warning' %]
+
+ [% ELSIF m.type == 'error' %]
+
+ [% END %]
+ [% SWITCH m.code %]
+ [% CASE 'biblio_not_modified' %]
+ Bibliographic record [% m.biblionumber | html %] has not been modified. An error occurred on modifying it.[% IF m.error %] ([% m.error | html %])[% END %].
+ [% CASE 'biblio_modified' %]
+ Bibliographic record [% m.biblionumber | html %] has successfully been modified.
+ [% END %]
+
+ [% END %]
+[% END %]
+
+[% BLOCK js %]
+ $("#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/admin/background_jobs.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt
@@ -57,6 +57,8 @@ Administration › Koha
[% IF op == 'view' %]
Detail of job #[% job.id | html %]
+ [% PROCESS "background_jobs/${job.type}.inc" %]
+
@@ -280,21 +158,9 @@ Administration › Koha
"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,resizable=yes');
- return false;
- }
- });
+ [% IF op == 'view' %]
+ [% PROCESS 'js' %]
+ [% END %]
});
[% END %]
--