From 1e987ead5875777bdc8517d27ca03a0e638bbe74 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 24 Jun 2014 15:40:06 +0200 Subject: [PATCH] =?utf8?q?ReportGenerator:=20class=20f=C3=BCr=20Links=20an?= =?utf8?q?geben=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/ReportGenerator.pm | 3 ++- templates/webpages/report_generator/html_report.html | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 %] - -- 2.20.1