From: Moritz Bunkus Date: Wed, 18 Jan 2017 15:25:31 +0000 (+0100) Subject: ActionBar: ReportGenerator nutzt per Default nun die ActionBar X-Git-Tag: release-3.5.4~1291 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e7913c4ca30470b30b0585205c6badbe2f99e655;p=kivitendo-erp.git ActionBar: ReportGenerator nutzt per Default nun die ActionBar --- diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index 32939e089..16991cf3c 100644 --- a/SL/Controller/DeliveryPlan.pm +++ b/SL/Controller/DeliveryPlan.pm @@ -42,7 +42,7 @@ sub action_list { my $orderitems = $self->models->get; $self->calc_qtys($orderitems); $self->setup_list_action_bar; - $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems, action_bar => 1); + $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems); } # private functions diff --git a/SL/Controller/DeliveryValueReport.pm b/SL/Controller/DeliveryValueReport.pm index 874b8a7bb..6af57e815 100644 --- a/SL/Controller/DeliveryValueReport.pm +++ b/SL/Controller/DeliveryValueReport.pm @@ -56,7 +56,7 @@ sub action_list { my $orderitems = $self->models->get; $self->calc_qtys_price($orderitems); $self->setup_list_action_bar; - $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems, action_bar => 1); + $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems); } sub prepare_report { diff --git a/SL/Controller/FinancialControllingReport.pm b/SL/Controller/FinancialControllingReport.pm index ab1192504..7b392f184 100644 --- a/SL/Controller/FinancialControllingReport.pm +++ b/SL/Controller/FinancialControllingReport.pm @@ -206,7 +206,7 @@ sub list_objects { $data->{$_}->{data} = $::form->format_amount(\%::myconfig, $data->{$_}->{data}, 2) for grep { !m/_p$/ } @{ $self->{number_columns} }; }; - return $self->report_generator_list_objects(report => $self->{report}, objects => $self->orders, data_callback => $modify_data, action_bar => 1); + return $self->report_generator_list_objects(report => $self->{report}, objects => $self->orders, data_callback => $modify_data); } sub make_filter_summary { diff --git a/SL/Controller/Helper/ReportGenerator.pm b/SL/Controller/Helper/ReportGenerator.pm index 20ab8c3b4..5a83be4b0 100644 --- a/SL/Controller/Helper/ReportGenerator.pm +++ b/SL/Controller/Helper/ReportGenerator.pm @@ -141,12 +141,12 @@ sub report_generator_list_objects { } my %options = %{ $params{options} || {} }; - $options{action_bar} //= $params{action_bar}; + $options{action_bar} //= $params{action_bar} // 1; if ($params{layout}) { return $params{report}->generate_with_headers(%options); } else { - my $html = $params{report}->generate_html_content(%options); + my $html = $params{report}->generate_html_content(action_bar => 0, %options); $self->render(\$html , { layout => 0, process => 0 }); } } diff --git a/SL/Controller/Inventory.pm b/SL/Controller/Inventory.pm index b2dccb159..102cc314b 100644 --- a/SL/Controller/Inventory.pm +++ b/SL/Controller/Inventory.pm @@ -367,7 +367,7 @@ sub action_usage { $report->set_options('raw_bottom_info_text' => $self->render('inventory/report_bottom', { output => 0 }) ); } - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); diff --git a/SL/Controller/Letter.pm b/SL/Controller/Letter.pm index ca739cfd0..ed48f41a9 100644 --- a/SL/Controller/Letter.pm +++ b/SL/Controller/Letter.pm @@ -176,7 +176,7 @@ sub action_list { $self->prepare_report; my $letters = $self->models->get; - $self->report_generator_list_objects(report => $self->{report}, objects => $letters, action_bar => 1); + $self->report_generator_list_objects(report => $self->{report}, objects => $letters); } diff --git a/SL/Controller/PriceRule.pm b/SL/Controller/PriceRule.pm index 3b1c8c2e1..2723d47af 100644 --- a/SL/Controller/PriceRule.pm +++ b/SL/Controller/PriceRule.pm @@ -38,7 +38,7 @@ sub action_list { $self->prepare_report; - $self->report_generator_list_objects(report => $self->{report}, objects => $price_rules, $::form->{inline} ? (layout => 0, header => 0) : (action_bar => 1)); + $self->report_generator_list_objects(report => $self->{report}, objects => $price_rules, $::form->{inline} ? (layout => 0, header => 0) : ()); } sub action_new { diff --git a/SL/Controller/Project.pm b/SL/Controller/Project.pm index 21b3d82d2..59e1034b8 100644 --- a/SL/Controller/Project.pm +++ b/SL/Controller/Project.pm @@ -65,7 +65,7 @@ sub action_list { $self->prepare_report; - $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get, action_bar => 1); + $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get); } sub action_new { diff --git a/SL/Controller/RequirementSpec.pm b/SL/Controller/RequirementSpec.pm index d70cd2d94..ecc8e32f8 100644 --- a/SL/Controller/RequirementSpec.pm +++ b/SL/Controller/RequirementSpec.pm @@ -55,7 +55,7 @@ sub action_list { $self->_setup_search_action_bar; $self->prepare_report; - $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get, action_bar => 1); + $self->report_generator_list_objects(report => $self->{report}, objects => $self->models->get); } sub action_new { diff --git a/SL/Controller/YearEndTransactions.pm b/SL/Controller/YearEndTransactions.pm index 4a9f06c47..cab851556 100644 --- a/SL/Controller/YearEndTransactions.pm +++ b/SL/Controller/YearEndTransactions.pm @@ -56,7 +56,7 @@ sub action_list { ); $self->setup_list_action_bar; - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); } diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 36a81f35b..a62f0e46a 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -447,6 +447,9 @@ sub setup_action_bar { sub generate_html_content { my ($self, %params) = @_; + + $params{action_bar} //= 1; + my $variables = $self->prepare_html_content(%params); $self->setup_action_bar($params{action_bar}, $variables) if $params{action_bar}; diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index a1a7635ab..408eb4ef4 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1201,7 +1201,7 @@ sub ar_transactions { $::request->layout->add_javascripts('kivi.MassInvoiceCreatePrint.js'); setup_ar_transactions_action_bar(num_rows => scalar(@{ $form->{AR} })); - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); } diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index c2b2bfdbf..ba2a86aff 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -301,7 +301,7 @@ sub list_names { } setup_ct_list_names_action_bar(); - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); } @@ -432,7 +432,7 @@ sub list_contacts { $report->add_data($row); } - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $::lxdebug->leave_sub; } diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index c20227978..37c7ef6bb 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -453,7 +453,7 @@ sub show_dunning { $report->set_options_from_form(); setup_dn_show_dunning_action_bar(); - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 026387616..07988dbb2 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -845,7 +845,7 @@ sub orders { setup_do_orders_action_bar(); - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); } diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index f0cd92bac..0776b7503 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -634,7 +634,7 @@ sub generate_report { setup_gl_transactions_action_bar(num_rows => scalar(@{$form->{GL}})); - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); } diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index b1cb02bc7..d6a67c47a 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -588,7 +588,7 @@ sub generate_report { } setup_ic_generate_report_action_bar(); - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $lxdebug->leave_sub(); } #end generate_report diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index dccfccbfb..b024853cc 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1261,7 +1261,7 @@ sub orders { $report->add_data(create_subtotal_row(\%totals, \@columns, \%column_alignment, \@subtotal_columns, 'listtotal')); setup_oe_orders_action_bar(); - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); } diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index 214a26a64..a729e3738 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -740,7 +740,7 @@ sub generate_journal { $report->set_options('raw_bottom_info_text' => $form->parse_html_template('common/paginate', { 'pages' => $pages , 'base_url' => $href.'&sort='.$form->{sort}.'&order='.$form->{order}}) ); } - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); } @@ -973,7 +973,7 @@ sub generate_report { {'pages' => $pages , 'base_url' => $href}) ); } - $report->generate_with_headers(action_bar => 1); + $report->generate_with_headers(); $main::lxdebug->leave_sub(); }