From 3810d658da001bdf828e6a19b194d0876c7b63e1 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 26 Jan 2017 13:38:16 +0100 Subject: [PATCH] =?utf8?q?ActionBar:=20Verwendung=20bei=20=C2=BBKontenabgl?= =?utf8?q?eich=20mit=20Bank=C2=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Reconciliation.pm | 30 +++++++++++++++++++ menus/user/00-erp.yaml | 1 - templates/webpages/reconciliation/form.html | 5 +--- templates/webpages/reconciliation/search.html | 8 +---- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/SL/Controller/Reconciliation.pm b/SL/Controller/Reconciliation.pm index 1bfd3905d..c9d415f1e 100644 --- a/SL/Controller/Reconciliation.pm +++ b/SL/Controller/Reconciliation.pm @@ -29,6 +29,7 @@ __PACKAGE__->run_before('_bank_account'); sub action_search { my ($self) = @_; + $self->setup_search_action_bar; $self->render('reconciliation/search'); } @@ -41,6 +42,7 @@ sub action_reconciliation { $self->_get_balances; + $self->setup_reconciliation_action_bar; $self->render('reconciliation/form', ui_tab => scalar(@{$self->{PROPOSALS}}) > 0?1:0, title => t8('Reconciliation')); @@ -620,4 +622,32 @@ sub init_BANK_ACCOUNTS { SL::DB::Manager::BankAccount->get_all_sorted( query => [ obsolete => 0 ] ); } +sub setup_search_action_bar { + my ($self, %params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Show'), + submit => [ '#search_form', { action => 'Reconciliation/reconciliation' } ], + accesskey => 'enter', + ], + ); + } +} + +sub setup_reconciliation_action_bar { + my ($self, %params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Filter'), + call => [ 'filter_table' ], + accesskey => 'enter', + ], + ); + } +} + 1; diff --git a/menus/user/00-erp.yaml b/menus/user/00-erp.yaml index 4e6f10a29..53e8795a6 100644 --- a/menus/user/00-erp.yaml +++ b/menus/user/00-erp.yaml @@ -706,7 +706,6 @@ access: bank_transaction params: action: Reconciliation/search - next_sub: Reconciliation/reconciliation - parent: cash id: cash_reconciliation name: Reconciliation diff --git a/templates/webpages/reconciliation/form.html b/templates/webpages/reconciliation/form.html index 0d21c7697..926ff7988 100644 --- a/templates/webpages/reconciliation/form.html +++ b/templates/webpages/reconciliation/form.html @@ -26,7 +26,7 @@ html, body {
[% title %]
[%- INCLUDE 'common/flash.html' %] -
+ @@ -77,8 +77,6 @@ html, body {
[% 'Bank account' | $T8 %]
- [% L.submit_tag('submit_filter', LxERP.t8("Filter"), onclick='filter_table();return false;', style='display: none') %] -
  • [% 'Overview' | $T8 %]
  • @@ -130,4 +128,3 @@ $.cookie('jquery_ui_tab_reconc_tabs', [% ui_tab %] ); //--> - diff --git a/templates/webpages/reconciliation/search.html b/templates/webpages/reconciliation/search.html index 3474b282c..7ed1986fc 100644 --- a/templates/webpages/reconciliation/search.html +++ b/templates/webpages/reconciliation/search.html @@ -3,7 +3,7 @@ [%- USE L %] [%- USE LxERP %] - +
    [% 'Choose bank account for reconciliation' | $T8 %]
    @@ -35,10 +35,4 @@

    - -
    - -[% L.hidden_tag('action', FORM.next_sub) %] - -

    [% L.submit_tag('dummy', LxERP.t8('Continue')) %]

    -- 2.20.1