5 [% BLOCK show_job_status %]
6 [% SWITCH job.status %]
17 [% CASE # Default case %]
18 [% job.status | html %]
21 [% BLOCK show_job_type %]
23 [% CASE "batch_biblio_record_modification" %]
24 Batch bibliographic record modification
25 [% CASE "batch_authority_record_modification" %]
26 Batch authority record modification
27 [% CASE # Default case %]
31 [% INCLUDE 'doc-head-open.inc' %]
34 Details of job #[% job.id | html %] ›
36 Background jobs ›
37 Administration › Koha
40 [% INCLUDE 'doc-head-close.inc' %]
43 <body id="admin_background_jobs" class="admin">
44 [% INCLUDE 'header.inc' %]
45 [% INCLUDE 'prefs-admin-search.inc' %]
47 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
50 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
53 [% IF CAN_user_parameters_manage_background_jobs %]
55 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
59 <a href="/cgi-bin/koha/admin/background_jobs.pl">Background jobs</a>
62 <a href="#" aria-current="page">Details of job #[% job.id | html %]</a>
66 <a href="#" aria-current="page">Background jobs</a>
71 <a href="#" aria-current="page">Administration</a>
77 <div class="main container-fluid">
79 <div class="col-sm-10 col-sm-push-2">
82 [% FOR m IN messages %]
83 <div class="dialog message">
85 [% CASE 'cannot_view_job' %]
86 <div><i class="fa fa-exclamation error"></i>Insufficient permission to see this job.</div>
94 <h1>Details of job #[% job.id | html %]</h1>
96 <fieldset class="rows">
98 <li><span class="label">Job ID: </span>[% job.id | html %]</li>
100 <label for="job_status">Status: </label>
101 [% PROCESS show_job_status %]
103 <li><label for="job_progress">Progress: </label>[% job.progress || 0 | html %] / [% job.size | html %]</li>
105 <label for="job_type">Type: </label>
106 [% PROCESS show_job_type %]
109 <label for="job_enqueued_on">Queued: </label>
110 [% job.enqueued_on | $KohaDates with_hours = 1 %]
113 <label for="job_started_on">Started: </label>
114 [% job.started_on | $KohaDates with_hours = 1 %]
117 <label for="job_ended_on">Ended: </label>
118 [% job.ended_on | $KohaDates with_hours = 1 %]
120 <li><label for="job_data">Report: </label>
121 [% SWITCH job.type %]
122 [% CASE 'batch_biblio_record_modification' %]
123 [% SET report = job.report %]
125 [% IF report.total_records == report.total_success %]
126 <div class="dialog message">
127 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>
130 Add modified records to the following list:
131 <select name="add_bibs_to_list" id="add_bibs_to_list">
132 <option value="">Select a list</option>
133 [% FOREACH list IN lists %]
134 <option class="shelf" value="[% list.shelfnumber | html %]">[% list.shelfname | html %]</option>
140 <div class="dialog message">
141 [% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred.
142 [% IF job.status == 'cancelled' %]The job has been cancelled before it finished.[% END %]
143 <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
147 [% CASE 'batch_authority_record_modification' %]
148 [% SET report = job.report %]
150 [% IF report.total_records == report.total_success %]
151 <div class="dialog message">
152 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>
155 <div class="dialog message">
156 [% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred.
157 [% IF job.status == 'cancelled' %]The job has been cancelled before it finished.[% END %]
158 <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
162 [% CASE %]Job type "[% job.type | html %]" not handled in the template
165 <li><label for="job_data">Detailed messages: </label>
166 [% SWITCH job.type %]
167 [% CASE 'batch_biblio_record_modification' %]
168 [% FOR m IN job.messages %]
169 <div class="dialog message">
170 [% IF m.type == 'success' %]
171 <i class="fa fa-check success"></i>
172 [% ELSIF m.type == 'warning' %]
173 <i class="fa fa-warning warn"></i>
174 [% ELSIF m.type == 'error' %]
175 <i class="fa fa-exclamation error"></i>
178 [% CASE 'biblio_not_modified' %]
179 Bibliographic record <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.biblionumber | uri %]">[% m.biblionumber | html %]</a> has not been modified. An error occurred on modifying it.[% IF m.error %] ([% m.error | html %])[% END %].
180 [% CASE 'biblio_modified' %]
181 Bibliographic record <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.biblionumber | uri %]">[% m.biblionumber | html %]</a> has successfully been modified.
185 [% CASE 'batch_authority_record_modification' %]
186 [% FOR m IN job.messages %]
187 <div class="dialog message">
188 [% IF m.type == 'success' %]
189 <i class="fa fa-check success"></i>
190 [% ELSIF m.type == 'warning' %]
191 <i class="fa fa-warning warn"></i>
192 [% ELSIF m.type == 'error' %]
193 <i class="fa fa-exclamation error"></i>
196 [% CASE 'authority_not_modified' %]
197 Authority record <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% m.authid | uri %]">[% m.authid | html %]</a> has not been modified. An error occurred on modifying it[% IF m.error %] ([% m.error | html %])[% END %].
198 [% CASE 'authority_modified' %]
199 Authority record <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% m.authid | uri %]">[% m.authid | html %]</a> has successfully been modified.
203 [% CASE %]Job type "[% job.type | html %]" not handled in the template
209 [% IF CAN_user_parameters_manage_background_jobs %]
210 <fieldset class="action">
211 <a href="/cgi-bin/koha/admin/background_jobs.pl">Return to the job list</a>
216 [% IF op == 'list' %]
218 <h2>Background jobs</h2>
221 <table id="table_background_jobs">
231 <th class="noExport">Actions</th>
235 [% FOREACH job IN jobs %]
237 <td>[% job.id | html %]</td>
239 [% PROCESS show_job_status %]
241 <td>[% job.progress || 0 | html %] / [% job.size | html %]</td>
243 [% SWITCH job.type %]
244 [% CASE 'batch_biblio_record_modification' %]Batch bibliographic record modification
245 [% CASE 'batch_authority_record_modification' %]Batch authority record modification
246 [% CASE %][% job.type | html %]
249 <td>[% job.enqueued_on | $KohaDates with_hours = 1 %]</td>
250 <td>[% job.started_on| $KohaDates with_hours = 1 %]</td>
251 <td>[% job.ended_on| $KohaDates with_hours = 1 %]</td>
253 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=[% job.id | html %]"><i class="fa fa-eye"></i> View</a>
254 [% IF job.status == 'new' || job.status == 'started' %]
255 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/background_jobs.pl?op=cancel&id=[% job.id | html %]"><i class="fa fa-trash"></i> Cancel</a>
263 <div class="dialog message">
264 There are no background jobs yet.
270 </div> <!-- /.col-sm-10.col-sm-push-2 -->
272 <div class="col-sm-2 col-sm-pull-10">
274 [% INCLUDE 'admin-menu.inc' %]
276 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
277 </div> <!-- /.row -->
279 [% MACRO jsinclude BLOCK %]
280 [% Asset.js("js/admin-menu.js") | $raw %]
281 [% INCLUDE 'datatables.inc' %]
283 $(document).ready(function() {
284 $("#table_background_jobs").dataTable($.extend(true, {}, dataTablesDefaults, {
286 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
288 "aaSorting": [[ 0, "desc" ]],
289 "iDisplayLength": 10,
290 "sPaginationType": "full_numbers"
293 $("#add_bibs_to_list").change(function(){
294 var selected = $("#add_bibs_to_list").find("option:selected");
295 if ( selected.attr("class") == "shelf" ){
296 var shelfnumber = selected.attr("value");
297 var bibs = new Array();
298 [% FOREACH message IN job.messages %]
299 [% IF message.code == 'biblio_modified' %]
300 bibs.push("biblionumber="+[% message.biblionumber | html %]);
303 var bibstring = bibs.join("&");
304 window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&'+bibstring, 'popup', 'width=500,height=500,toolbar=false,scrollbars=yes,resizable=yes');
311 [% INCLUDE 'intranet-bottom.inc' %]