From 22160ea4c5a22844f77b3309c03ca6f4c84da6ac Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 16 Jan 2017 13:10:31 +0100 Subject: [PATCH] ActionBar: Verwendung beim Lieferwertbericht --- SL/Controller/DeliveryValueReport.pm | 18 +++++++++++++++--- .../delivery_value_report/_filter.html | 2 -- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/SL/Controller/DeliveryValueReport.pm b/SL/Controller/DeliveryValueReport.pm index 61d950d17..874b8a7bb 100644 --- a/SL/Controller/DeliveryValueReport.pm +++ b/SL/Controller/DeliveryValueReport.pm @@ -55,7 +55,8 @@ sub action_list { my $orderitems = $self->models->get; $self->calc_qtys_price($orderitems); - $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems); + $self->setup_list_action_bar; + $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems, action_bar => 1); } sub prepare_report { @@ -293,8 +294,19 @@ SQL } } - - +sub setup_list_action_bar { + my ($self, %params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Update'), + submit => [ '#filter_form', { action => 'DeliveryValueReport/list' } ], + accesskey => 'enter', + ], + ); + } +} 1; diff --git a/templates/webpages/delivery_value_report/_filter.html b/templates/webpages/delivery_value_report/_filter.html index c65ae0f0f..307ca32ac 100644 --- a/templates/webpages/delivery_value_report/_filter.html +++ b/templates/webpages/delivery_value_report/_filter.html @@ -88,12 +88,10 @@ -[% L.hidden_tag('action', 'DeliveryValueReport/dispatch') %] [% L.hidden_tag('sort_by', FORM.sort_by) %] [% L.hidden_tag('sort_dir', FORM.sort_dir) %] [% L.hidden_tag('page', FORM.page) %] [% L.hidden_tag('vc', SELF.vc) %] -[% L.input_tag('action_list', LxERP.t8('Continue'), type = 'submit', class='submit')%] [% L.button_tag('$("#filter_form").resetForm()', LxERP.t8('Reset')) %] -- 2.20.1