Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
[kivitendo-erp.git] / templates / webpages / background_job / list.html
1 [% USE HTML %][% USE L %][% USE LxERP %]
2
3 <body>
4  <div class="listtop">[% FORM.title %]</div>
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>[%- LxERP.t8('Execution type') %]</th>
19      <th>[%- LxERP.t8('Package name') %]</th>
20      <th>[%- LxERP.t8('Active') %]</th>
21      <th>[%- LxERP.t8('Execution schedule') %]</th>
22      <th>[%- LxERP.t8('Last run at') %]</th>
23      <th>[%- LxERP.t8('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       [%- IF background_job.type == 'once' %]
32        [%- LxERP.t8('one-time execution') %]
33       [%- ELSIF background_job.type == 'interval' %]
34        [%- LxERP.t8('repeated execution') %]
35       [% ELSE %]
36        [%- HTML.escape(background_job.type) %]
37       [%- END %]
38      <td>
39       <a href="[% SELF.url_for(action => 'edit', id => background_job.id) %]">
40        [%- HTML.escape(background_job.package_name) %]
41       </a>
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   <hr size="3" noshade>
67
68   <p>
69    <a href="[% SELF.url_for(action => 'new') %]">[%- LxERP.t8('Create new background job') %]</a>
70    |
71    <a href="[% SELF.url_for(controller => 'TaskServer', action => 'show') %]">[%- LxERP.t8('Task server control') %]</a>
72   </p>
73  </form>
74 </body>
75 </html>