From: Sven Schöling Date: Tue, 7 Oct 2014 14:57:21 +0000 (+0200) Subject: PriceRule: Report inlinefähig gemacht X-Git-Tag: release-3.2.0beta~128 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=678f57a3852524663977b8903c47404070d17469;p=kivitendo-erp.git PriceRule: Report inlinefähig gemacht --- diff --git a/SL/Controller/PriceRule.pm b/SL/Controller/PriceRule.pm index 60870e2ad..c77a2da48 100644 --- a/SL/Controller/PriceRule.pm +++ b/SL/Controller/PriceRule.pm @@ -37,7 +37,7 @@ sub action_list { $self->prepare_report; - $self->report_generator_list_objects(report => $self->{report}, objects => $price_rules); + $self->report_generator_list_objects(report => $self->{report}, objects => $price_rules, $::form->{inline} ? (layout => 0, header => 0) : ()); } sub action_new { @@ -167,13 +167,14 @@ sub prepare_report { controller_class => 'PriceRule', output_format => 'HTML', title => ($self->vc eq 'customer' ? t8('Sales Price Rules') : t8('Purchase Price Rules')) , - allow_pdf_export => 1, - allow_csv_export => 1, + allow_pdf_export => !$::form->{inline}, + allow_csv_export => !$::form->{inline}, ); $report->set_columns(%column_defs); $report->set_column_order(@columns); $report->set_export_options(qw(list filter)); $report->set_options_from_form; + $self->models->get_models_url_params(sub{ map { $_ => $::form->{$_} } qw(inline) }); $self->models->set_report_generator_sort_options(report => $report, sortable_columns => \@sortable); $report->set_options( raw_bottom_info_text => $self->render('price_rule/report_bottom', { output => 0 }), diff --git a/templates/webpages/price_rule/report_bottom.html b/templates/webpages/price_rule/report_bottom.html index cee635dcb..97254866a 100644 --- a/templates/webpages/price_rule/report_bottom.html +++ b/templates/webpages/price_rule/report_bottom.html @@ -3,4 +3,6 @@ [% USE HTML %] [%- L.paginate_controls(models=SELF.models) %] +[%- UNLESS FORM.inline %] [% 'New Price Rule' | $T8 %] +[%- END %] diff --git a/templates/webpages/price_rule/report_top.html b/templates/webpages/price_rule/report_top.html index 2d2e52ccc..0af23b4d5 100644 --- a/templates/webpages/price_rule/report_top.html +++ b/templates/webpages/price_rule/report_top.html @@ -1,4 +1,4 @@ [%- USE L %] [%- PROCESS 'common/flash.html' %] -[%- PROCESS 'price_rule/_filter.html' filter=SELF.filter %] +[%- PROCESS 'price_rule/_filter.html' filter=SELF.filter UNLESS FORM.inline %]