6 [% BLOCK show_job_status %]
7 [% SWITCH job.status %]
10 [% CASE "cancelled" %]
18 [% CASE # Default case %]
19 [% job.status | html %]
22 [% BLOCK show_job_type %]
24 [% CASE 'batch_biblio_record_modification' %]
25 Batch bibliographic record modification
26 [% CASE 'batch_biblio_record_deletion' %]
27 Batch bibliographic record record deletion
28 [% CASE 'batch_authority_record_modification' %]
29 Batch authority record modification
30 [% CASE 'batch_authority_record_deletion' %]
31 Batch authority record deletion
32 [% CASE 'batch_item_record_modification' %]
33 Batch item record modification
34 [% CASE 'batch_item_record_deletion' %]
35 Batch item record deletion
36 [% CASE "batch_hold_cancel" %]
37 Batch hold cancellation
38 [% CASE %]Unknown job type '[% job_type | html %]'
42 [% INCLUDE 'doc-head-open.inc' %]
45 Details of job #[% job.id | html %] ›
47 Background jobs ›
48 Administration › Koha
51 [% INCLUDE 'doc-head-close.inc' %]
54 <body id="admin_background_jobs" class="admin">
55 [% INCLUDE 'header.inc' %]
56 [% INCLUDE 'prefs-admin-search.inc' %]
58 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
61 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
64 [% IF CAN_user_parameters_manage_background_jobs %]
66 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
70 <a href="/cgi-bin/koha/admin/background_jobs.pl">Background jobs</a>
73 <a href="#" aria-current="page">Details of job #[% job.id | html %]</a>
77 <a href="#" aria-current="page">Background jobs</a>
82 <a href="#" aria-current="page">Administration</a>
88 <div class="main container-fluid">
90 <div class="col-sm-10 col-sm-push-2">
93 [% FOR m IN messages %]
94 <div class="dialog message">
96 [% CASE 'cannot_view_job' %]
97 <div><i class="fa fa-exclamation error"></i>Insufficient permission to see this job.</div>
104 [% IF op == 'view' %]
105 <h1>Details of job #[% job.id | html %]</h1>
107 [% PROCESS "background_jobs/${job.type}.inc" %]
109 <fieldset class="rows">
111 <li><span class="label">Job ID: </span>[% job.id | html %]</li>
113 <label for="job_status">Status: </label>
114 [% PROCESS show_job_status %]
116 <li><label for="job_progress">Progress: </label>[% job.progress || 0 | html %] / [% job.size | html %]</li>
118 <label for="job_type">Type: </label>
119 [% PROCESS show_job_type job_type => job.type %]
122 <label for="job_enqueued_on">Queued: </label>
123 [% job.enqueued_on | $KohaDates with_hours = 1 %]
126 <label for="job_started_on">Started: </label>
127 [% job.started_on | $KohaDates with_hours = 1 %]
130 <label for="job_ended_on">Ended: </label>
131 [% job.ended_on | $KohaDates with_hours = 1 %]
133 <li><label for="job_data">Report: </label>
134 [% PROCESS 'report' %]
136 <li><label for="job_data">Detailed messages: </label>
137 [% PROCESS 'detail' %]
142 [% IF CAN_user_parameters_manage_background_jobs %]
143 <fieldset class="action">
144 <a href="/cgi-bin/koha/admin/background_jobs.pl">Return to the job list</a>
149 [% IF op == 'list' %]
151 <h2>Background jobs</h2>
154 <table id="table_background_jobs">
164 <th class="noExport">Actions</th>
168 [% FOREACH job IN jobs %]
170 <td>[% job.id | html %]</td>
172 [% PROCESS show_job_status %]
174 <td>[% job.progress || 0 | html %] / [% job.size | html %]</td>
176 [% PROCESS show_job_type job_type => job.type %]
178 <td>[% job.enqueued_on | $KohaDates with_hours = 1 %]</td>
179 <td>[% job.started_on| $KohaDates with_hours = 1 %]</td>
180 <td>[% job.ended_on| $KohaDates with_hours = 1 %]</td>
182 <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>
183 [% IF job.status == 'new' || job.status == 'started' %]
184 <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>
192 <div class="dialog message">
193 There are no background jobs yet.
199 </div> <!-- /.col-sm-10.col-sm-push-2 -->
201 <div class="col-sm-2 col-sm-pull-10">
203 [% INCLUDE 'admin-menu.inc' %]
205 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
206 </div> <!-- /.row -->
208 [% MACRO jsinclude BLOCK %]
209 [% Asset.js("js/admin-menu.js") | $raw %]
210 [% INCLUDE 'datatables.inc' %]
212 $(document).ready(function() {
213 $("#table_background_jobs").dataTable($.extend(true, {}, dataTablesDefaults, {
215 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
217 "aaSorting": [[ 0, "desc" ]],
218 "iDisplayLength": 10,
219 "sPaginationType": "full_numbers"
224 [% IF op == 'view' %]
229 [% INCLUDE 'intranet-bottom.inc' %]