From: Moritz Bunkus Date: Wed, 18 Jan 2017 12:52:15 +0000 (+0100) Subject: ActionBar: Verwendung bei Jahresendbuchungen X-Git-Tag: release-3.5.4~1294 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cb0414d6fc74555cf85cc74152c5d7c2cb0168e2;p=kivitendo-erp.git ActionBar: Verwendung bei Jahresendbuchungen --- diff --git a/SL/Controller/YearEndTransactions.pm b/SL/Controller/YearEndTransactions.pm index 37517bae8..4a9f06c47 100644 --- a/SL/Controller/YearEndTransactions.pm +++ b/SL/Controller/YearEndTransactions.pm @@ -29,6 +29,8 @@ sub action_filter { $self->cb_reference(t8('CB Transaction')) if !$self->cb_reference; $self->ob_description(t8('OB Transaction')) if !$self->ob_description; $self->cb_description(t8('CB Transaction')) if !$self->cb_description; + + $self->setup_filter_action_bar; $self->render('gl/yearend_filter', title => t8('CB/OB Transactions'), make_title_of_chart => sub { $_[0]->accno.' '.$_[0]->description } @@ -52,7 +54,9 @@ sub action_list { allow_csv_export => 0, title => $::locale->text('CB/OB Transactions'), ); - $report->generate_with_headers(); + + $self->setup_list_action_bar; + $report->generate_with_headers(action_bar => 1); $main::lxdebug->leave_sub(); } @@ -270,4 +274,38 @@ sub init_charts { SL::DB::Manager::Chart->get_all( query => [ \ "accno not like '9%'"], sort_by => 'accno ASC' ); } +sub setup_filter_action_bar { + my ($self) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Continue'), + submit => [ '#filter_form', { action => 'YearEndTransactions/list' } ], + accesskey => 'enter', + ], + ); + } +} + +sub setup_list_action_bar { + my ($self) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Post'), + submit => [ '#form', { action => 'YearEndTransactions/generate' } ], + tooltip => t8('generate cb/ob transactions for selected charts'), + confirm => t8('Are you sure to generate cb/ob transactions?'), + accesskey => 'enter', + ], + action => [ + t8('Back'), + call => [ 'kivi.history_back' ], + ], + ); + } +} + 1; diff --git a/locale/de/all b/locale/de/all index c6796fc52..d376e641d 100755 --- a/locale/de/all +++ b/locale/de/all @@ -3687,7 +3687,7 @@ $self->{texts} = { 'from \'#1\' imported Files' => 'Von \'#1\' importierte Dateien', 'from (time)' => 'von', 'general_ledger_list' => 'Buchungsjournal', - 'generate cb/ob transactions for selected charts' => 'Buchungen erstellen', + 'generate cb/ob transactions for selected charts' => 'Start-/Endbuchungen für ausgewählte Konten erstellen', 'generated Files' => 'Erzeugte Dokumente', 'gobd-#1-#2.zip' => 'gobd-#1-#2.zip', 'h' => 'h', diff --git a/templates/webpages/gl/yearend_bottom.html b/templates/webpages/gl/yearend_bottom.html index 017319201..1a8fb822d 100644 --- a/templates/webpages/gl/yearend_bottom.html +++ b/templates/webpages/gl/yearend_bottom.html @@ -1,8 +1,5 @@ [%- USE L %] [%- USE LxERP %] - - - -
- [%- L.hidden_tag("action","YearEndTransactions/dispatch") %] [%- L.hidden_tag("cb_date",SELF.cb_date.to_kivitendo) %] [%- L.hidden_tag("cb_startdate",SELF.cb_startdate.to_kivitendo) %] [%- L.hidden_tag("cb_reference",SELF.cb_reference) %] @@ -12,9 +9,4 @@ [%- L.hidden_tag("ob_description",SELF.ob_description) %] [%- L.hidden_tag("cbob_chart",SELF.cbob_chart) %] [%- L.hidden_tag("rowcount",SELF.row_count) %] - [%- L.submit_tag("action_generate", LxERP.t8('generate cb/ob transactions for selected charts'), - confirm=LxERP.t8('Are you sure to generate cb/ob transactions?')) %] - [%- L.submit_tag("action_filter", LxERP.t8('back')) %] -
+ diff --git a/templates/webpages/gl/yearend_filter.html b/templates/webpages/gl/yearend_filter.html index 28fcd1c33..1391f47ba 100644 --- a/templates/webpages/gl/yearend_filter.html +++ b/templates/webpages/gl/yearend_filter.html @@ -56,9 +56,4 @@ [% L.select_tag('cbob_chart', SELF.charts9000, title_sub=\make_title_of_chart, default=SELF.cbob_chart, style="width: 400px") %] - -[% L.hidden_tag('action', 'YearEndTransactions/dispatch') %] -

-[% L.submit_tag('action_list', LxERP.t8('Continue')) %] - diff --git a/templates/webpages/gl/yearend_top.html b/templates/webpages/gl/yearend_top.html index 6a7967c63..59cca0e00 100644 --- a/templates/webpages/gl/yearend_top.html +++ b/templates/webpages/gl/yearend_top.html @@ -1,5 +1,5 @@ [%- USE LxERP %] -
+