b3d53eaa4fef6b1392e5a3b5d89d56cbfc9fe7de
[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  <form method="post" action="controller.pl">
8   [% IF !BACKGROUND_JOBS.size %]
9    <p>
10     [%- LxERP.t8('No background job has been created yet.') %]
11    </p>
12
13   [%- ELSE %]
14    <table id="background_job_list" width="100%">
15     <thead>
16      <tr class="listheading">
17       <th>[% L.sortable_table_header('package_name') %]</th>
18       <th>[% L.sortable_table_header('type') %]</th>
19       <th>[% L.sortable_table_header('active') %]</th>
20       <th>[% L.sortable_table_header('cron_spec') %]</th>
21       <th>[% L.sortable_table_header('last_run_at') %]</th>
22       <th>[% L.sortable_table_header('next_run_at') %]</th>
23      </tr>
24     </thead>
25
26     <tbody>
27     [%- FOREACH background_job = BACKGROUND_JOBS %]
28     <tr class="listrow[% loop.count % 2 %]" id="background_job_id_[% background_job.id %]">
29      <td>
30       <a href="[% SELF.url_for(action => 'edit', id => background_job.id, back_to => SELF.get_callback) %]">
31        [%- HTML.escape(background_job.package_name) %]
32       </a>
33      </td>
34      <td>
35       [%- IF background_job.type == 'once' %]
36        [%- LxERP.t8('one-time execution') %]
37       [%- ELSIF background_job.type == 'interval' %]
38        [%- LxERP.t8('repeated execution') %]
39       [% ELSE %]
40        [%- HTML.escape(background_job.type) %]
41       [%- END %]
42      </td>
43      <td align="right">[% IF background_job.active %][%- LxERP.t8('yes') %][% ELSE %][%- LxERP.t8('no') %][%- END %]</td>
44      <td>[%- HTML.escape(background_job.cron_spec) %]</td>
45      <td>
46       [%- IF background_job.last_run_at %]
47        [%- HTML.escape(background_job.last_run_at.to_lxoffice('precision' => 'second')) %]
48       [%- ELSE %]
49        [%- LxERP.t8('never') %]
50       [%- END %]
51      </td>
52
53      <td>
54       [%- IF background_job.next_run_at %]
55        [%- HTML.escape(background_job.next_run_at.to_lxoffice('precision' => 'second')) %]
56       [%- ELSE %]
57        [%- LxERP.t8('not set') %]
58       [%- END %]
59      </td>
60     </tr>
61     [%- END %]
62     </tbody>
63    </table>
64   [%- END %]
65
66   [% L.paginate_controls %]
67
68   <hr size="3" noshade>
69
70   <p>
71    <a href="[% SELF.url_for(action => 'new', back_to => SELF.get_callback) %]">[%- LxERP.t8('Create new background job') %]</a>
72    |
73    <a href="[% SELF.url_for(controller => 'BackgroundJobHistory', action => 'list') %]">[%- LxERP.t8('View background job history') %]</a>
74    |
75    <a href="[% SELF.url_for(controller => 'TaskServer', action => 'show') %]">[%- LxERP.t8('Task server control') %]</a>
76   </p>
77  </form>