ActionBar: Verwendung bei »Aktuelle Hintergrund-Jobs anzeigen«
[kivitendo-erp.git] / templates / webpages / background_job / list.html
1 [% USE HTML %][% USE L %][% USE LxERP %]
2
3  <h1>[% FORM.title %]</h1>
4
5 [%- INCLUDE 'common/flash.html' %]
6
7   [% IF !BACKGROUND_JOBS.size %]
8    <p>
9     [%- LxERP.t8('No background job has been created yet.') %]
10    </p>
11
12   [%- ELSE %]
13    <table id="background_job_list" width="100%">
14     <thead>
15      <tr class="listheading">
16       <th>[% L.sortable_table_header('package_name') %]</th>
17       <th>[% L.sortable_table_header('type') %]</th>
18       <th>[% L.sortable_table_header('active') %]</th>
19       <th>[% L.sortable_table_header('cron_spec') %]</th>
20       <th>[% L.sortable_table_header('last_run_at') %]</th>
21       <th>[% L.sortable_table_header('next_run_at') %]</th>
22      </tr>
23     </thead>
24
25     <tbody>
26     [%- FOREACH background_job = BACKGROUND_JOBS %]
27     <tr class="listrow[% loop.count % 2 %]" id="background_job_id_[% background_job.id %]">
28      <td>
29       <a href="[% SELF.url_for(action => 'edit', id => background_job.id, back_to => SELF.get_callback) %]">
30        [%- HTML.escape(background_job.package_name) %]
31       </a>
32      </td>
33      <td>
34       [%- IF background_job.type == 'once' %]
35        [%- LxERP.t8('one-time execution') %]
36       [%- ELSIF background_job.type == 'interval' %]
37        [%- LxERP.t8('repeated execution') %]
38       [% ELSE %]
39        [%- HTML.escape(background_job.type) %]
40       [%- END %]
41      </td>
42      <td align="right">[% IF background_job.active %][%- LxERP.t8('yes') %][% ELSE %][%- LxERP.t8('no') %][%- END %]</td>
43      <td>[%- HTML.escape(background_job.cron_spec) %]</td>
44      <td>
45       [%- IF background_job.last_run_at %]
46        [%- HTML.escape(background_job.last_run_at.to_lxoffice('precision' => 'second')) %]
47       [%- ELSE %]
48        [%- LxERP.t8('never') %]
49       [%- END %]
50      </td>
51
52      <td>
53       [%- IF background_job.next_run_at %]
54        [%- HTML.escape(background_job.next_run_at.to_lxoffice('precision' => 'second')) %]
55       [%- ELSE %]
56        [%- LxERP.t8('not set') %]
57       [%- END %]
58      </td>
59     </tr>
60     [%- END %]
61     </tbody>
62    </table>
63   [%- END %]
64
65   [% L.paginate_controls %]