use parent qw(SL::Controller::Base);
use SL::Helper::Flash;
+use SL::Locale::String qw(t8);
use SL::System::TaskServer;
use Rose::Object::MakeMethods::Generic
flash('warning', $::locale->text('The task server does not appear to be running.')) if !$self->task_server->is_running;
+ $self->setup_show_action_bar;
$self->render('task_server/show',
title => $::locale->text('Task server status'),
last_command_output => $::auth->get_session_value('TaskServer::last_command_output'));
return SL::System::TaskServer->new;
}
+sub setup_show_action_bar {
+ my ($self) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ $self->task_server->is_running ? t8('Stop server') : t8('Start server'),
+ submit => [ '#form' ],
+ accesskey => 'enter',
+ ],
+ link => [
+ t8('List of jobs'),
+ link => $self->url_for(controller => 'BackgroundJob', action => 'list'),
+ ],
+ link => [
+ t8('Job history'),
+ link => $self->url_for(controller => 'BackgroundJobHistory', action => 'list'),
+ ],
+ );
+ }
+}
+
1;
'Jahresverkehrszahlen neu' => 'Jahresverkehrszahlen neu',
'Jan' => 'Jan',
'January' => 'Januar',
+ 'Job history' => 'Jobverlauf',
'Journal' => 'Buchungsjournal',
'Journal of Last 10 Transfers' => 'Letzte 10 Lagertransaktionen',
'Jul' => 'Jul',
'List of bank transfers' => 'Überweisungsliste',
'List of custom variables' => 'Liste der benutzerdefinierten Variablen',
'List of database upgrades to be applied:' => 'Liste der noch einzuspielenden Datenbankupgrades:',
+ 'List of jobs' => 'Jobliste',
'List of tax zones' => 'Liste der Steuerzonen',
'List open SEPA exports' => 'Noch nicht ausgeführte SEPA-Exporte anzeigen',
'Load' => 'Laden',
'Start date' => 'Startdatum',
'Start of year' => 'Jahresanfang',
'Start process' => 'Prozess starten',
- 'Start task server' => 'Task-Server starten',
+ 'Start server' => 'Server starten',
'Start the correction assistant' => 'Korrekturassistenten starten',
'Startdate_coa' => 'Gültig ab',
'Starting Balance' => 'Eröffnungsbilanzwerte',
'Stock for part #1' => 'Bestand für Artikel #1',
'Stock value' => 'Bestandswert',
'Stocked Qty' => 'Lagermenge',
- 'Stop task server' => 'Task-Server beenden',
+ 'Stop server' => 'Server stoppen',
'Stopping the task server failed. Output:' => 'Das Beenden des Task-Servers schlug fehl.',
'Storage Backends' => 'Datei-Speicher',
'Storage Type for Attachments' => 'Speichertyp für Anhänge',
-[% USE HTML %][% USE L %][% USE LxERP %]
+[% USE HTML %][% USE L %][% USE LxERP %][%- USE P -%]
<h1>[% FORM.title %]</h1>
[%- INCLUDE 'common/flash.html' %]
</tbody>
</table>
- <p>
-[% IF SELF.task_server.is_running %]
- <a href="[% SELF.url_for(action => 'stop') %]">[%- LxERP.t8('Stop task server') %]</a>
-[%- ELSE %]
- <a href="[% SELF.url_for(action => 'start') %]">[%- LxERP.t8('Start task server') %]</a>
-[%- END %]
- |
- <a href="[% SELF.url_for(controller => 'BackgroundJob', action => 'list') %]">[%- LxERP.t8('View background jobs') %]</a>
- |
- <a href="[% SELF.url_for(controller => 'BackgroundJobHistory', action => 'list') %]">[%- LxERP.t8('View background job history') %]</a>
- </p>
+<form id="form" method="post" action="controller.pl">
+ [% P.hidden_tag("action", "TaskServer/" _ (SELF.task_server.is_running ? "stop" : "start")) %]
+</form>