X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/dc7791df0d3e919e691fb3fd3d7ee20e3c5e7ca1..3f26a3a5f90df8b834de122d6fb1dfab59a6e804:/SL/Template/Plugin/L.pm diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 39b520e84..c590082cf 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -111,6 +111,8 @@ sub select_tag { my $title_sub = delete($attributes{title_sub}); my $default_sub = delete($attributes{default_sub}); + my $with_empty = delete($attributes{with_empty}); + my $empty_title = delete($attributes{empty_title}); my %selected; @@ -128,8 +130,8 @@ sub select_tag { my @options; - if ( delete($attributes{with_empty}) ) { - push(@options, [undef, $attributes{empty_title} || '']); + if ( $with_empty ) { + push(@options, [undef, $empty_title || '']); } my $normalize_entry = sub { @@ -180,7 +182,7 @@ sub select_tag { my $title; if ( $value_title_sub ) { - ($value, $title) = $value_title_sub->($entry); + ($value, $title) = @{ $value_title_sub->($entry) }; } else { $value = $normalize_entry->('value', $entry, $value_sub, $value_key); @@ -665,7 +667,7 @@ sub sortable_table_header { my $by_spec = $sort_spec->{$by}; my %current_sort_params = $controller->get_current_sort_params; my ($image, $new_dir) = ('', $current_sort_params{dir}); - my $title = delete($params{title}) || $by_spec->{title}; + my $title = delete($params{title}) || $::locale->text($by_spec->{title}); if ($current_sort_params{by} eq $by) { my $current_dir = $current_sort_params{dir} ? 'up' : 'down'; @@ -687,11 +689,7 @@ sub paginate_controls { my %paginate_params = $controller->get_current_paginate_params; my %template_params = ( - pages => { - cur => $paginate_params{page}, - max => $paginate_params{num_pages}, - common => $paginate_params{common_pages}, - }, + pages => \%paginate_params, url_maker => sub { my %url_params = _hashify(@_); $url_params{ $paginate_spec->{FORM_PARAMS}->[0] } = delete $url_params{page};