4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Administration › [% IF op =='add_form' %]Background jobs› [% IF job %] View background job[% ELSE %] Background jobs[% END %][% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
9 <body id="admin_background_jobs" class="admin">
10 [% INCLUDE 'header.inc' %]
12 <div id="breadcrumbs">
13 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
14 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
15 › <a href="/cgi-bin/koha/admin/background_jobs.pl">Background jobs</a>
18 <div class="main container-fluid">
20 <div class="col-sm-10 col-sm-push-2">
23 [% FOR m IN messages %]
24 <div class="dialog message">
26 [% CASE 'cannot_retrieve_jobs' %]
27 <div><i class="fa fa-exclamation error"></i>Cannot retrieve pending jobs ([% m.error %])</div>
35 <h1>Detail of job #[% job.id | html %]</h1>
37 <fieldset class="rows">
39 <li><span class="label">Job ID: </span>[% job.id | html %]</li>
40 <li><label for="job_status">Status: </label>[% job.status | html %]</li>
41 <li><label for="job_progress">Progress: </label>[% job.progress || 0 | html %] / [% job.size | html %]</li>
42 <li><label for="job_type">Type: </label>[% job.type | html %]</li>
43 <li><label for="job_enqueued_on">enqueued_on: </label>[% job.enqueued_on | html %]</li>
44 <li><label for="job_started_on">started_on: </label>[% job.started_on | html %]</li>
45 <li><label for="job_ended_on">ended_on: </label>[% job.ended_on | html %]</li>
46 <li><label for="job_data">Report: </label>
48 [% CASE 'batch_biblio_record_modification' %]
49 [% SET report = job.report %]
51 [% IF report.total_records == report.total_success %]
52 <div class="dialog message">
53 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>
56 <div class="dialog message">
57 [% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred.
58 [% IF job.status == 'cancelled' %]The job has been cancelled before it finished.[% END %]
59 <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
63 [% CASE 'batch_authority_record_modification' %]
64 [% SET report = job.report %]
66 [% IF report.total_records == report.total_success %]
67 <div class="dialog message">
68 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>
71 <div class="dialog message">
72 [% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred.
73 [% IF job.status == 'cancelled' %]The job has been cancelled before it finished.[% END %]
74 <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
78 [% CASE %]Job type "[% job.type | html %]" not handled in the template
81 <li><label for="job_data">Detailed messages: </label>
83 [% CASE 'batch_biblio_record_modification' %]
84 [% FOR m IN job.messages %]
85 <div class="dialog message">
86 [% IF m.type == 'success' %]
87 <i class="fa fa-check success"></i>
88 [% ELSIF m.type == 'warning' %]
89 <i class="fa fa-warning warn"></i>
90 [% ELSIF m.type == 'error' %]
91 <i class="fa fa-exclamation error"></i>
94 [% CASE 'biblio_not_modified' %]
95 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 %])[% END %].
96 [% CASE 'biblio_modified' %]
97 Bibliographic record <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.biblionumber | uri %]">[% m.biblionumber | html %]</a> has successfully been modified.
100 <li><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a>
103 <label for="add_bibs_to_list">Add modified records to the following list: </label>
104 <select name="add_bibs_to_list" id="add_bibs_to_list">
105 <option value="">Select a list</option>
106 [% FOREACH list IN lists %]
107 <option class="shelf" value="[% list.shelfnumber | html %]">[% list.shelfname | html %]</option>
116 [% CASE 'batch_authority_record_modification' %]
117 [% FOR m IN job.messages %]
118 <div class="dialog message">
119 [% IF m.type == 'success' %]
120 <i class="fa fa-check success"></i>
121 [% ELSIF m.type == 'warning' %]
122 <i class="fa fa-warning warn"></i>
123 [% ELSIF m.type == 'error' %]
124 <i class="fa fa-exclamation error"></i>
127 [% CASE 'authority_not_modified' %]
128 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 %])[% END %].
129 [% CASE 'authority_modified' %]
130 Authority record <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% m.authid | uri %]">[% m.authid | html %]</a> has successfully been modified..
134 [% CASE %]Job type "[% job.type | html %]" not handled in the template
140 <a href="/cgi-bin/koha/admin/background_jobs.pl">Return to the job list</a>
143 [% IF op == 'list' %]
145 <h2>Background jobs</h2>
147 <div class="dialog message">
148 <i class="fa fa-info"></i>
149 [% IF pending_jobs.size > 0 %]
150 There is [% pending_jobs.size %] pending jobs on the server: [% pending_jobs.join(', ') %].
152 There is no pending jobs on the server.
157 <table id="table_background_jobs">
167 <th>Actions (NIY)</th>
171 [% FOREACH job IN jobs %]
173 <td>[% job.id | html %]</td>
174 <td>[% job.status | html %]</td>
175 <td>[% job.progress || 0 | html %] / [% job.size | html %]</td>
177 [% SWITCH job.type %]
178 [% CASE 'batch_biblio_record_modification' %]Batch bibliographic record modification
179 [% CASE 'batch_authority_record_modification' %]Batch authority record modification
180 [% CASE %][% job.type | html %]
183 <td>[% job.enqueued_on | html %]</td>
184 <td>[% job.started_on| html %]</td>
185 <td>[% job.ended_on| html %]</td>
187 <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>
188 [% IF job.status == 'new' || job.status == 'started' %]
189 <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>
191 <a class="btn btn-default btn-xs disabled" href="/cgi-bin/koha/admin/background_jobs.pl?op=replay&id=[% job.id | html %]"><i class="fa fa-refresh"></i> Replay</a>
198 <div class="dialog message">
199 There are no background jobs yet.
205 </div> <!-- /.col-sm-10.col-sm-push-2 -->
207 <div class="col-sm-2 col-sm-pull-10">
209 [% INCLUDE 'admin-menu.inc' %]
211 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
212 </div> <!-- /.row -->
214 [% MACRO jsinclude BLOCK %]
215 [% Asset.js("js/admin-menu.js") | $raw %]
216 [% INCLUDE 'datatables.inc' %]
218 $(document).ready(function() {
219 $("#table_background_jobs").dataTable($.extend(true, {}, dataTablesDefaults, {
221 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
223 "aaSorting": [[ 0, "desc" ]],
224 "iDisplayLength": 10,
225 "sPaginationType": "full_numbers"
230 [% INCLUDE 'intranet-bottom.inc' %]