Revision af8ebe5e
Von Tamino Steinert vor etwa 2 Jahren hinzugefügt
SL/Controller/Reclamation.pm | ||
---|---|---|
5 | 5 |
|
6 | 6 |
use SL::Helper::Flash qw(flash_later); |
7 | 7 |
use SL::Presenter::Tag qw(select_tag hidden_tag div_tag); |
8 |
use SL::Presenter::ReclamationFilter qw(filter); |
|
8 | 9 |
use SL::Locale::String qw(t8); |
9 | 10 |
use SL::SessionFile::Random; |
10 | 11 |
use SL::PriceSource; |
... | ... | |
2100 | 2101 |
} |
2101 | 2102 |
$column_defs{$_}->{text} ||= t8( $self->models->get_sort_spec->{$_}->{title} || $_ ) for keys %column_defs; |
2102 | 2103 |
|
2103 |
my @columns_to_show = grep { $::form->{"include_in_report_$_"}} keys %column_defs;
|
|
2104 |
my @columns_to_show = grep { $::form->{active_in_report}->{"$_"} } keys %column_defs;
|
|
2104 | 2105 |
unless (scalar(@columns_to_show)){ @columns_to_show = @default_columns; } |
2105 | 2106 |
|
2106 | 2107 |
my %active_in_report = map { $_ => 1 } @columns_to_show; |
2107 |
$self->models->add_additional_url_params(map { "include_in_report_" . $_ => 1 } @columns_to_show); #for reorder
|
|
2108 |
$self->models->add_additional_url_params(map { "active_in_report." . $_ => 1 } @columns_to_show); #for reorder
|
|
2108 | 2109 |
my %columns_in_report = map {$_ => $column_defs{$_}} @columns_to_show; |
2109 | 2110 |
|
2110 | 2111 |
## add cvars TODO(Tamino): Add own cvars |
... | ... | |
2123 | 2124 |
#my @cvar_column_form_names = ('_include_cvars_from_form', map { "include_cvars_" . $_->name } @{ $self->includeable_cvar_configs }); |
2124 | 2125 |
|
2125 | 2126 |
# make all sortable |
2126 |
my @sortable = keys %columns_in_report; |
|
2127 |
my @sortable = keys %columns_in_report; |
|
2128 |
|
|
2129 |
my $filter_html = SL::Presenter::ReclamationFilter::filter( |
|
2130 |
$::form->{filter}, $self->type, active_in_report => \%active_in_report |
|
2131 |
); |
|
2127 | 2132 |
|
2128 | 2133 |
$report->set_options( |
2129 | 2134 |
std_column_visibility => 1, |
... | ... | |
2132 | 2137 |
raw_top_info_text => $self->render( |
2133 | 2138 |
'reclamation/_report_top', |
2134 | 2139 |
{ output => 0 }, |
2135 |
type => $self->type, |
|
2136 |
active_in_report => \%active_in_report, |
|
2140 |
FILTER_HTML => $filter_html, |
|
2137 | 2141 |
), |
2138 | 2142 |
raw_bottom_info_text => $self->render( |
2139 | 2143 |
'reclamation/_report_bottom', |
Auch abrufbar als: Unified diff
Reclamation: Presenter ReclamationFilter added