From 66e5ad7be944770f6c4e71fd84c9dd33cd1460c9 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 8 Nov 2007 14:56:06 +0000 Subject: [PATCH] Trennstriche in Berichten als Rahmen der Tabellenzellen zeichnen, nicht als
. --- SL/ReportGenerator.pm | 18 +++++++++- .../report_generator/html_report_de.html | 36 +++++++++++++++++-- .../report_generator/html_report_master.html | 36 +++++++++++++++++-- 3 files changed, 83 insertions(+), 7 deletions(-) diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 732016b94..617a27474 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -268,20 +268,33 @@ sub prepare_html_content { } my ($outer_idx, $inner_idx) = (0, 0); + my $next_border_top; my @rows; foreach my $row_set (@{ $self->{data} }) { if ('HASH' eq ref $row_set) { + if ($row_set->{type} eq 'separator') { + if (! scalar @rows) { + $next_border_top = 1; + } else { + $rows[-1]->{BORDER_BOTTOM} = 1; + } + + next; + } + my $row_data = { 'IS_CONTROL' => 1, - 'IS_SEPARATOR' => $row_set->{type} eq 'separator', 'IS_COLSPAN_DATA' => $row_set->{type} eq 'colspan_data', 'NUM_COLUMNS' => scalar @visible_columns, + 'BORDER_TOP' => $next_border_top, 'data' => $row_set->{data}, }; push @rows, $row_data; + $next_border_top = 0; + next; } @@ -306,9 +319,12 @@ sub prepare_html_content { 'outer_idx' => $outer_idx, 'outer_idx_odd' => $outer_idx % 2, 'inner_idx' => $inner_idx, + 'BORDER_TOP' => $next_border_top, }; push @rows, $row_data; + + $next_border_top = 0; } } diff --git a/templates/webpages/report_generator/html_report_de.html b/templates/webpages/report_generator/html_report_de.html index b14b02e50..de330cfc4 100644 --- a/templates/webpages/report_generator/html_report_de.html +++ b/templates/webpages/report_generator/html_report_de.html @@ -10,6 +10,19 @@ --> + + [% IF MESSAGE %]

[% MESSAGE %]

[% END %] @@ -33,11 +46,28 @@ [% FOREACH row = ROWS %] [% IF row.IS_CONTROL %] - [% IF row.IS_SEPARATOR %]
[% END %][% IF row.IS_COLSPAN_DATA %][% row.data %][% END %] + [% IF row.IS_COLSPAN_DATA %][% row.data %][% END %] [% ELSE %] - [% FOREACH col = row.COLUMNS %][% IF col.raw_data %][% col.raw_data %][% END %][% USE iterator(col.CELL_ROWS) %][% FOREACH cell_row = iterator %][% IF cell_row.data %][% IF cell_row.link %][% END %][% cell_row.data %][% IF cell_row.link %][% END %][% END %][% UNLESS iterator.last %]
[% END %][% END %] - [% END %] + [%- FOREACH col = row.COLUMNS %] + + [%- IF col.raw_data %][%- col.raw_data %][%- END %] + [%- USE iterator(col.CELL_ROWS) %][%- FOREACH cell_row = iterator %] + [%- IF cell_row.data %] + [%- IF cell_row.link %][%- END %] + [%- cell_row.data %] + [%- IF cell_row.link %][%- END %] + [%- END %] + [%- UNLESS iterator.last %]
[%- END %] + [%- END %] + + [%- END %] [% END %] [% END %] diff --git a/templates/webpages/report_generator/html_report_master.html b/templates/webpages/report_generator/html_report_master.html index c77fbdb37..d76788bbb 100644 --- a/templates/webpages/report_generator/html_report_master.html +++ b/templates/webpages/report_generator/html_report_master.html @@ -10,6 +10,19 @@ --> + + [% IF MESSAGE %]

[% MESSAGE %]

[% END %] @@ -33,11 +46,28 @@ [% FOREACH row = ROWS %] [% IF row.IS_CONTROL %] - [% IF row.IS_SEPARATOR %]
[% END %][% IF row.IS_COLSPAN_DATA %][% row.data %][% END %] + [% IF row.IS_COLSPAN_DATA %][% row.data %][% END %] [% ELSE %] - [% FOREACH col = row.COLUMNS %][% IF col.raw_data %][% col.raw_data %][% END %][% USE iterator(col.CELL_ROWS) %][% FOREACH cell_row = iterator %][% IF cell_row.data %][% IF cell_row.link %][% END %][% cell_row.data %][% IF cell_row.link %][% END %][% END %][% UNLESS iterator.last %]
[% END %][% END %] - [% END %] + [%- FOREACH col = row.COLUMNS %] + + [%- IF col.raw_data %][%- col.raw_data %][%- END %] + [%- USE iterator(col.CELL_ROWS) %][%- FOREACH cell_row = iterator %] + [%- IF cell_row.data %] + [%- IF cell_row.link %][%- END %] + [%- cell_row.data %] + [%- IF cell_row.link %][%- END %] + [%- END %] + [%- UNLESS iterator.last %]
[%- END %] + [%- END %] + + [%- END %] [% END %] [% END %] -- 2.20.1