From 1c4d3cd500d74096f96a7a1497c8a68b3bedb64d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 12 Jan 2017 17:01:41 +0100 Subject: [PATCH] ActionBar: Verwendung bei Artikelsuche --- bin/mozilla/ic.pl | 54 ++++++++++++++++++- .../webpages/ic/generate_report_bottom.html | 11 +--- templates/webpages/ic/search.html | 8 +-- 3 files changed, 54 insertions(+), 19 deletions(-) diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 2aae5cdd5..ffe5d07f0 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -94,6 +94,7 @@ sub search { 'include_prefix' => 'l_', 'include_value' => 'Y'); + setup_ic_search_action_bar(); $form->header; $form->get_lists('partsgroup' => 'ALL_PARTSGROUPS'); @@ -586,9 +587,58 @@ sub generate_report { $report->add_data($row); } - $report->generate_with_headers(); + setup_ic_generate_report_action_bar(); + $report->generate_with_headers(action_bar => 1); $lxdebug->leave_sub(); } #end generate_report -sub continue { call_sub($form->{"nextsub"}); } +sub setup_ic_search_action_bar { + my %params = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Continue'), + submit => [ '#form', { action => 'generate_report' } ], + accesskey => 'enter', + ], + + action => [ + t8('TOP100'), + submit => [ '#form', { action => 'top100' } ], + ], + ); + } +} + +sub setup_ic_generate_report_action_bar { + my %params = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + combobox => [ + action => [ + t8('Add'), + ], + action => [ + t8('Add Part'), + submit => [ '#new_form', { action => 'Part/add_part' } ], + accesskey => 'enter', + ], + action => [ + t8('Add Service'), + submit => [ '#new_form', { action => 'Part/add_service' } ], + ], + action => [ + t8('Add Assembly'), + submit => [ '#new_form', { action => 'Part/add_assembly' } ], + ], + action => [ + t8('Add Assortment'), + submit => [ '#new_form', { action => 'Part/add_assortment' } ], + ], + ], # end of combobox "Add part" + ); + } +} diff --git a/templates/webpages/ic/generate_report_bottom.html b/templates/webpages/ic/generate_report_bottom.html index 7a15ee55a..c00442576 100644 --- a/templates/webpages/ic/generate_report_bottom.html +++ b/templates/webpages/ic/generate_report_bottom.html @@ -47,15 +47,6 @@ -
- + - - - - - - - -
diff --git a/templates/webpages/ic/search.html b/templates/webpages/ic/search.html index 0be5ac006..5bd7b5b6f 100644 --- a/templates/webpages/ic/search.html +++ b/templates/webpages/ic/search.html @@ -6,7 +6,7 @@ [% SET style="width: 250px" %]

[% title %]

-
+ @@ -14,7 +14,6 @@ - @@ -233,9 +232,4 @@
- -

- - -

-- 2.20.1