From: Moritz Bunkus Date: Tue, 24 Jun 2014 13:40:06 +0000 (+0200) Subject: ReportGenerator: class für Links angeben können X-Git-Tag: release-3.2.0beta~411^2~15 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1e987ead5875777bdc8517d27ca03a0e638bbe74;p=kivitendo-erp.git ReportGenerator: class für Links angeben können --- diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 09ab7bd7b..6fc50e98f 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -121,7 +121,7 @@ sub add_data { $row->{$column}->{align} = $self->{columns}->{$column}->{align} unless (defined $row->{$column}->{align}); } - foreach my $field (qw(data link)) { + foreach my $field (qw(data link link_class)) { map { $row->{$_}->{$field} = [ $row->{$_}->{$field} ] if (ref $row->{$_}->{$field} ne 'ARRAY') } keys %{ $row }; } } @@ -351,6 +351,7 @@ sub prepare_html_content { push @{ $col->{CELL_ROWS} }, { 'data' => '' . $self->html_format($col->{data}->[$i]), 'link' => $col->{link}->[$i], + link_class => $col->{link_class}->[$i], }; } diff --git a/templates/webpages/report_generator/html_report.html b/templates/webpages/report_generator/html_report.html index c2fe759b3..1430969dd 100644 --- a/templates/webpages/report_generator/html_report.html +++ b/templates/webpages/report_generator/html_report.html @@ -35,7 +35,7 @@ [%- IF col.align %] align="[% HTML.escape(col.align) %]" style="text-align: [% HTML.escape(col.align) %]"[% END -%] [%- IF col.colspan && col.colspan > 1 %] colspan="[% HTML.escape(col.colspan) %]"[% END -%] > - [%- IF col.link -%][%- END -%] + [%- IF col.link -%][%- END -%] [%- col.text -%] [%- IF col.show_sort_indicator -%][%- END -%] [%- IF col.link -%][%- END -%] @@ -63,7 +63,7 @@ [%- ELSE %] [%- USE iterator(col.CELL_ROWS) %][%- FOREACH cell_row = iterator %] [%- IF cell_row.data != '' %] - [%- IF cell_row.link %][%- END %] + [%- IF cell_row.link %][%- END %] [%- cell_row.data %] [%- IF cell_row.link %][%- END %] [%- END %] @@ -126,4 +126,3 @@ [% END %] -