Revision 98819982
Von Bernd Bleßmann vor mehr als 7 Jahren hinzugefügt
SL/Controller/Helper/ReportGenerator.pm | ||
---|---|---|
22 | 22 |
my $key = $::form->{CONTROLLER_DISPATCH} ? 'action' : 'report_generator_form.report_generator_dispatch_to'; |
23 | 23 |
my $value = $::form->{CONTROLLER_DISPATCH} ? $::form->{CONTROLLER_DISPATCH} . "/" : ''; |
24 | 24 |
|
25 |
$::request->layout->get('actionbar')->add( |
|
26 |
action => [ |
|
27 |
$type eq 'pdf' ? $::locale->text('PDF export') : $::locale->text('CSV export'), |
|
28 |
submit => [ '#report_generator_form', { $key => "${value}report_generator_export_as_${type}" } ], |
|
29 |
], |
|
30 |
action => [ |
|
31 |
$::locale->text('Back'), |
|
32 |
submit => [ '#report_generator_form', { $key => "${value}report_generator_back" } ], |
|
33 |
], |
|
34 |
); |
|
25 |
for my $bar ($::request->layout->get('actionbar')) { |
|
26 |
$bar->add( |
|
27 |
action => [ |
|
28 |
$type eq 'pdf' ? $::locale->text('PDF export') : $::locale->text('CSV export'), |
|
29 |
submit => [ '#report_generator_form', { $key => "${value}report_generator_export_as_${type}" } ], |
|
30 |
], |
|
31 |
action => [ |
|
32 |
$::locale->text('Back'), |
|
33 |
submit => [ '#report_generator_form', { $key => "${value}report_generator_back" } ], |
|
34 |
], |
|
35 |
); |
|
36 |
} |
|
35 | 37 |
} |
36 | 38 |
|
37 | 39 |
sub action_report_generator_export_as_pdf { |
Auch abrufbar als: Unified diff
S:C:H:ReportGenerator: Ergebnis von layout->get als Liste verwenden
Sonst ist der Export (PDF/CSV) von Controllern, die diesen Helper verwenden,
kaputt. Fehlermeldung war:
Can't locate object method "add" via package "1" (perhaps you forgot to load "1"?)
at SL/Controller/Helper/ReportGenerator.pm line 25.