Revision 678f57a3
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/Controller/PriceRule.pm | ||
---|---|---|
37 | 37 |
|
38 | 38 |
$self->prepare_report; |
39 | 39 |
|
40 |
$self->report_generator_list_objects(report => $self->{report}, objects => $price_rules); |
|
40 |
$self->report_generator_list_objects(report => $self->{report}, objects => $price_rules, $::form->{inline} ? (layout => 0, header => 0) : ());
|
|
41 | 41 |
} |
42 | 42 |
|
43 | 43 |
sub action_new { |
... | ... | |
167 | 167 |
controller_class => 'PriceRule', |
168 | 168 |
output_format => 'HTML', |
169 | 169 |
title => ($self->vc eq 'customer' ? t8('Sales Price Rules') : t8('Purchase Price Rules')) , |
170 |
allow_pdf_export => 1,
|
|
171 |
allow_csv_export => 1,
|
|
170 |
allow_pdf_export => !$::form->{inline},
|
|
171 |
allow_csv_export => !$::form->{inline},
|
|
172 | 172 |
); |
173 | 173 |
$report->set_columns(%column_defs); |
174 | 174 |
$report->set_column_order(@columns); |
175 | 175 |
$report->set_export_options(qw(list filter)); |
176 | 176 |
$report->set_options_from_form; |
177 |
$self->models->get_models_url_params(sub{ map { $_ => $::form->{$_} } qw(inline) }); |
|
177 | 178 |
$self->models->set_report_generator_sort_options(report => $report, sortable_columns => \@sortable); |
178 | 179 |
$report->set_options( |
179 | 180 |
raw_bottom_info_text => $self->render('price_rule/report_bottom', { output => 0 }), |
templates/webpages/price_rule/report_bottom.html | ||
---|---|---|
3 | 3 |
[% USE HTML %] |
4 | 4 |
[%- L.paginate_controls(models=SELF.models) %] |
5 | 5 |
|
6 |
[%- UNLESS FORM.inline %] |
|
6 | 7 |
<a href="[% SELF.url_for(action='new', 'price_rule.type'=SELF.vc, callback=SELF.models.get_callback) | html %]">[% 'New Price Rule' | $T8 %]</a> |
8 |
[%- END %] |
templates/webpages/price_rule/report_top.html | ||
---|---|---|
1 | 1 |
[%- USE L %] |
2 | 2 |
[%- PROCESS 'common/flash.html' %] |
3 |
[%- PROCESS 'price_rule/_filter.html' filter=SELF.filter %] |
|
3 |
[%- PROCESS 'price_rule/_filter.html' filter=SELF.filter UNLESS FORM.inline %]
|
|
4 | 4 |
<hr> |
Auch abrufbar als: Unified diff
PriceRule: Report inlinefähig gemacht