Revision 8b7577d4
Von Moritz Bunkus vor mehr als 9 Jahren hinzugefügt
SL/Controller/Chart.pm | ||
---|---|---|
10 | 10 |
use SL::JSON; |
11 | 11 |
|
12 | 12 |
use Rose::Object::MakeMethods::Generic ( |
13 |
'scalar --get_set_init' => [ qw(charts models chart) ], |
|
13 |
'scalar --get_set_init' => [ qw(charts models chart filter) ],
|
|
14 | 14 |
); |
15 | 15 |
|
16 | 16 |
sub action_ajax_autocomplete { |
... | ... | |
111 | 111 |
); |
112 | 112 |
} |
113 | 113 |
|
114 |
sub init_filter { $_[0]->models->filtered->laundered } |
|
115 |
|
|
114 | 116 |
1; |
SL/Controller/Helper/GetModels/Filtered.pm | ||
---|---|---|
53 | 53 |
my %calculated_params = SL::Controller::Helper::ParseFilter::parse_filter($filter, %parse_filter_args); |
54 | 54 |
%calculated_params = $self->merge_args(\%calculated_params, \%filter_args, \%params); |
55 | 55 |
|
56 |
if ($self->laundered) { |
|
57 |
if ($self->get_models->controller->can('filter')) { |
|
58 |
$self->get_models->controller->filter($self->laundered); |
|
59 |
} else { |
|
60 |
$self->get_models->controller->{filter} = $self->laundered; |
|
61 |
} |
|
62 |
} |
|
63 |
|
|
64 | 56 |
# $::lxdebug->dump(0, "get_current_filter_params: ", \%calculated_params); |
65 | 57 |
|
66 | 58 |
$self->filter_params(\%calculated_params); |
templates/webpages/background_job_history/list.html | ||
---|---|---|
4 | 4 |
|
5 | 5 |
[%- INCLUDE 'common/flash.html' %] |
6 | 6 |
|
7 |
[%- PROCESS 'background_job_history/_filter.html' filter=SELF.filter %]
|
|
7 |
[%- PROCESS 'background_job_history/_filter.html' filter=SELF.models.filtered.laundered %]
|
|
8 | 8 |
|
9 | 9 |
[% IF !ENTRIES.size %] |
10 | 10 |
<p> |
templates/webpages/bank_transactions/report_top.html | ||
---|---|---|
1 | 1 |
[%- USE L %] |
2 |
[%- PROCESS 'bank_transactions/_filter.html' filter=SELF.filter %]
|
|
2 |
[%- PROCESS 'bank_transactions/_filter.html' filter=SELF.models.filtered.laundered %]
|
|
3 | 3 |
<hr> |
templates/webpages/delivery_plan/report_top.html | ||
---|---|---|
1 | 1 |
[%- USE L %] |
2 |
[%- PROCESS 'delivery_plan/_filter.html' filter=SELF.filter %]
|
|
2 |
[%- PROCESS 'delivery_plan/_filter.html' filter=SELF.models.filtered.laundered %]
|
|
3 | 3 |
<hr> |
templates/webpages/financial_controlling_report/report_top.html | ||
---|---|---|
1 | 1 |
[%- USE L %] |
2 |
[%- PROCESS 'financial_controlling_report/_filter.html' filter=SELF.filter %]
|
|
2 |
[%- PROCESS 'financial_controlling_report/_filter.html' filter=SELF.models.filtered.laundered %]
|
|
3 | 3 |
<hr> |
templates/webpages/part/part_picker_search.html | ||
---|---|---|
5 | 5 |
|
6 | 6 |
<div style='overflow:hidden'> |
7 | 7 |
|
8 |
[% LxERP.t8("Filter") %]: [% L.input_tag('part_picker_filter', SELF.filter.all_substr_multi__ilike, class='part_picker_filter') %]
|
|
8 |
[% LxERP.t8("Filter") %]: [% L.input_tag('part_picker_filter', SELF.models.filtered.laundered.all_substr_multi__ilike, class='part_picker_filter') %]
|
|
9 | 9 |
[% L.hidden_tag('part_picker_real_id', FORM.real_id) %] |
10 | 10 |
|
11 | 11 |
<div class='float-right'> |
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 UNLESS FORM.inline %]
|
|
3 |
[%- PROCESS 'price_rule/_filter.html' filter=SELF.models.filtered.laundered UNLESS FORM.inline %]
|
|
4 | 4 |
<hr> |
templates/webpages/project/report_top.html | ||
---|---|---|
9 | 9 |
</div> |
10 | 10 |
<div class='filter_toggle' style='display:none'> |
11 | 11 |
<a href='#' onClick='javascript:$(".filter_toggle").toggle()'>[% 'Hide Filter' | $T8 %]</a> |
12 |
[%- PROCESS 'project/_filter.html' filter=SELF.filter %]
|
|
12 |
[%- PROCESS 'project/_filter.html' filter=SELF.models.filtered.laundered %]
|
|
13 | 13 |
|
14 | 14 |
[% L.hidden_tag('action', 'Project/dispatch') %] |
15 | 15 |
[% L.hidden_tag('sort_by', FORM.sort_by) %] |
templates/webpages/requirement_spec/report_top.html | ||
---|---|---|
1 | 1 |
[%- USE L %] |
2 |
[%- PROCESS "requirement_spec/_filter.html" filter=SELF.filter %]
|
|
2 |
[%- PROCESS "requirement_spec/_filter.html" filter=SELF.models.filtered.laundered %]
|
|
3 | 3 |
<hr> |
Auch abrufbar als: Unified diff
GetModels Filtered: gelaunderten Filter nicht mehr in Controller schreiben
Statt dessen kann der gelaunderte Filter über das Filtered-Plugin
abgefragt werden, z.B. im Controller:
$self->models->filtered->laundered
oder im Template:
SELF.models.filtered.laundered