projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
28cda5b
)
DeliveryPlan: Weitere Umstellung auf Sorted-Helper
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 5 Sep 2012 14:30:26 +0000
(16:30 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 5 Sep 2012 15:09:04 +0000
(17:09 +0200)
SL/Controller/DeliveryPlan.pm
patch
|
blob
|
history
diff --git
a/SL/Controller/DeliveryPlan.pm
b/SL/Controller/DeliveryPlan.pm
index
ff17464
..
975e89c
100644
(file)
--- a/
SL/Controller/DeliveryPlan.pm
+++ b/
SL/Controller/DeliveryPlan.pm
@@
-60,7
+60,7
@@
sub action_list {
raw_bottom_info_text => $bottom,
controller_class => 'DeliveryPlan',
},
raw_bottom_info_text => $bottom,
controller_class => 'DeliveryPlan',
},
- report_generator_export_options => [ qw(list filter
sort_by sort_dir
) ],
+ report_generator_export_options => [ qw(list filter) ],
);
$self->{orderitems} = $self->get_models(%{ $self->db_args });
);
$self->{orderitems} = $self->get_models(%{ $self->db_args });
@@
-166,22
+166,11
@@
sub prepare_report {
map { $column_defs{$_}->{text} = $::locale->text( $self->get_sort_spec->{$_}->{title} ) } keys %column_defs;
map { $column_defs{$_}->{text} = $::locale->text( $self->get_sort_spec->{$_}->{title} ) } keys %column_defs;
- my %current_sort_params = $self->get_current_sort_params;
-
- for my $col (@sortable) {
- $column_defs{$col}{link} = $self->get_callback(
- # TODO: column header links from helper
- sort_by => $col,
- sort_dir => ($current_sort_params{by} eq $col ? 1 - $current_sort_params{dir} : $current_sort_params{dir}),
- );
- }
-
map { $column_defs{$_}->{visible} = 1 } @visible;
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
$report->set_options(allow_pdf_export => 1, allow_csv_export => 1);
map { $column_defs{$_}->{visible} = 1 } @visible;
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
$report->set_options(allow_pdf_export => 1, allow_csv_export => 1);
- $report->set_sort_indicator($current_sort_params{by}, $current_sort_params{dir});
$report->set_export_options(@{ $params{report_generator_export_options} || [] });
$report->set_options(
%{ $params{report_generator_options} || {} },
$report->set_export_options(@{ $params{report_generator_export_options} || [] });
$report->set_options(
%{ $params{report_generator_options} || {} },
@@
-190,6
+179,7
@@
sub prepare_report {
title => $::locale->text('Delivery Plan'),
);
$report->set_options_from_form;
title => $::locale->text('Delivery Plan'),
);
$report->set_options_from_form;
+ $self->set_report_generator_sort_options(report => $report, sortable_columns => \@sortable);
$self->disable_pagination if $report->{options}{output_format} =~ /^(pdf|csv)$/i;
$self->disable_pagination if $report->{options}{output_format} =~ /^(pdf|csv)$/i;