[% USE HTML %][% USE L %][% USE LxERP %]

[% FORM.title %]

[%- INCLUDE 'common/flash.html' %]
[% IF !BACKGROUND_JOBS.size %]

[%- LxERP.t8('No background job has been created yet.') %]

[%- ELSE %] [%- FOREACH background_job = BACKGROUND_JOBS %] [%- END %]
[% L.sortable_table_header('package_name') %] [% L.sortable_table_header('type') %] [% L.sortable_table_header('active') %] [% L.sortable_table_header('cron_spec') %] [% L.sortable_table_header('last_run_at') %] [% L.sortable_table_header('next_run_at') %]
[%- HTML.escape(background_job.package_name) %] [%- IF background_job.type == 'once' %] [%- LxERP.t8('one-time execution') %] [%- ELSIF background_job.type == 'interval' %] [%- LxERP.t8('repeated execution') %] [% ELSE %] [%- HTML.escape(background_job.type) %] [%- END %] [% IF background_job.active %][%- LxERP.t8('yes') %][% ELSE %][%- LxERP.t8('no') %][%- END %] [%- HTML.escape(background_job.cron_spec) %] [%- IF background_job.last_run_at %] [%- HTML.escape(background_job.last_run_at.to_lxoffice('precision' => 'second')) %] [%- ELSE %] [%- LxERP.t8('never') %] [%- END %] [%- IF background_job.next_run_at %] [%- HTML.escape(background_job.next_run_at.to_lxoffice('precision' => 'second')) %] [%- ELSE %] [%- LxERP.t8('not set') %] [%- END %]
[%- END %] [% L.paginate_controls %]

[%- LxERP.t8('Create new background job') %] | [%- LxERP.t8('View background job history') %] | [%- LxERP.t8('Task server control') %]