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