From 639381bf9b38c2bc1af11b60ab71eb7fd772f701 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 16 Mar 2017 10:55:28 +0100 Subject: [PATCH] ActionBar: ReportGenerator: get('actionbar') liefert Array von Bars --- bin/mozilla/reportgenerator.pl | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/bin/mozilla/reportgenerator.pl b/bin/mozilla/reportgenerator.pl index 5ba261f28..f2eb1ef1d 100644 --- a/bin/mozilla/reportgenerator.pl +++ b/bin/mozilla/reportgenerator.pl @@ -37,23 +37,25 @@ sub report_generator_set_default_sort { sub report_generator_setup_action_bar { my ($type, %params) = @_; - $::request->layout->get('actionbar')->add( - combobox => [ - action => [ - $type eq 'pdf' ? $::locale->text('PDF export') : $::locale->text('CSV export'), - submit => [ '#report_generator_form', { 'report_generator_dispatch_to' => "report_generator_export_as_${type}" } ], + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + combobox => [ + action => [ + $type eq 'pdf' ? $::locale->text('PDF export') : $::locale->text('CSV export'), + submit => [ '#report_generator_form', { 'report_generator_dispatch_to' => "report_generator_export_as_${type}" } ], + ], + action => [ + $::locale->text('PDF export with attachments'), + submit => [ '#report_generator_form', { report_generator_dispatch_to => "report_generator_export_as_pdf", report_generator_addattachments => 1 } ], + only_if => $params{allow_attachments}, + ], ], action => [ - $::locale->text('PDF export with attachments'), - submit => [ '#report_generator_form', { report_generator_dispatch_to => "report_generator_export_as_pdf", report_generator_addattachments => 1 } ], - only_if => $params{allow_attachments}, + $::locale->text('Back'), + submit => [ '#report_generator_form', { 'report_generator_dispatch_to' => "report_generator_back" } ], ], - ], - action => [ - $::locale->text('Back'), - submit => [ '#report_generator_form', { 'report_generator_dispatch_to' => "report_generator_back" } ], - ], - ); + ); + } } sub report_generator_export_as_pdf { -- 2.20.1