From 32dbd0b3957724a442dc86c3adba9ef09c3f6d8e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 28 Feb 2017 15:39:23 +0100 Subject: [PATCH] =?utf8?q?ActionBar:=20Verwendung=20bei=20=C2=BBVerlauf=20?= =?utf8?q?der=20Hintergrund-Jobs=C2=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/BackgroundJobHistory.pm | 32 +++++++++++++++++++ .../webpages/background_job_history/list.html | 8 ----- .../webpages/background_job_history/show.html | 4 --- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/SL/Controller/BackgroundJobHistory.pm b/SL/Controller/BackgroundJobHistory.pm index fae870643..4fbd7ece0 100644 --- a/SL/Controller/BackgroundJobHistory.pm +++ b/SL/Controller/BackgroundJobHistory.pm @@ -29,6 +29,7 @@ sub action_list { $self->make_filter_summary; + $self->setup_list_action_bar; $self->render('background_job_history/list', title => $::locale->text('Background job history'), ENTRIES => $self->models->get, @@ -41,6 +42,7 @@ sub action_show { my $back_to = $::form->{back_to} || $self->url_for(action => 'list'); $self->history(SL::DB::BackgroundJobHistory->new(id => $::form->{id})->load); + $self->setup_show_action_bar; $self->render('background_job_history/show', title => $::locale->text('View background job execution result'), back_to => $back_to); @@ -111,4 +113,34 @@ sub init_models { ); } +sub setup_list_action_bar { + my ($self) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + link => [ + t8('Server control'), + link => $self->url_for(controller => 'TaskServer', action => 'show'), + ], + link => [ + t8('List of jobs'), + link => $self->url_for(controller => 'BackgroundJob', action => 'list'), + ], + ); + } +} + +sub setup_show_action_bar { + my ($self) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + link => [ + t8('Back'), + link => $self->url_for(action => 'list'), + ], + ); + } +} + 1; diff --git a/templates/webpages/background_job_history/list.html b/templates/webpages/background_job_history/list.html index 029627425..d83bb2816 100644 --- a/templates/webpages/background_job_history/list.html +++ b/templates/webpages/background_job_history/list.html @@ -50,11 +50,3 @@ [%- END %] [% L.paginate_controls %] - -
- -

- [%- LxERP.t8('View background jobs') %] - | - [%- LxERP.t8('Task server control') %] -

diff --git a/templates/webpages/background_job_history/show.html b/templates/webpages/background_job_history/show.html index 5e42d08b3..a2f3ab6f3 100644 --- a/templates/webpages/background_job_history/show.html +++ b/templates/webpages/background_job_history/show.html @@ -45,7 +45,3 @@ - -

- [%- LxERP.t8('Back') %] -

-- 2.20.1