Revision 66e5ad7b
Von Moritz Bunkus vor etwa 17 Jahren hinzugefügt
SL/ReportGenerator.pm | ||
---|---|---|
268 | 268 |
} |
269 | 269 |
|
270 | 270 |
my ($outer_idx, $inner_idx) = (0, 0); |
271 |
my $next_border_top; |
|
271 | 272 |
my @rows; |
272 | 273 |
|
273 | 274 |
foreach my $row_set (@{ $self->{data} }) { |
274 | 275 |
if ('HASH' eq ref $row_set) { |
276 |
if ($row_set->{type} eq 'separator') { |
|
277 |
if (! scalar @rows) { |
|
278 |
$next_border_top = 1; |
|
279 |
} else { |
|
280 |
$rows[-1]->{BORDER_BOTTOM} = 1; |
|
281 |
} |
|
282 |
|
|
283 |
next; |
|
284 |
} |
|
285 |
|
|
275 | 286 |
my $row_data = { |
276 | 287 |
'IS_CONTROL' => 1, |
277 |
'IS_SEPARATOR' => $row_set->{type} eq 'separator', |
|
278 | 288 |
'IS_COLSPAN_DATA' => $row_set->{type} eq 'colspan_data', |
279 | 289 |
'NUM_COLUMNS' => scalar @visible_columns, |
290 |
'BORDER_TOP' => $next_border_top, |
|
280 | 291 |
'data' => $row_set->{data}, |
281 | 292 |
}; |
282 | 293 |
|
283 | 294 |
push @rows, $row_data; |
284 | 295 |
|
296 |
$next_border_top = 0; |
|
297 |
|
|
285 | 298 |
next; |
286 | 299 |
} |
287 | 300 |
|
... | ... | |
306 | 319 |
'outer_idx' => $outer_idx, |
307 | 320 |
'outer_idx_odd' => $outer_idx % 2, |
308 | 321 |
'inner_idx' => $inner_idx, |
322 |
'BORDER_TOP' => $next_border_top, |
|
309 | 323 |
}; |
310 | 324 |
|
311 | 325 |
push @rows, $row_data; |
326 |
|
|
327 |
$next_border_top = 0; |
|
312 | 328 |
} |
313 | 329 |
} |
314 | 330 |
|
templates/webpages/report_generator/html_report_de.html | ||
---|---|---|
10 | 10 |
--> |
11 | 11 |
</script> |
12 | 12 |
|
13 |
<style type="text/css"> |
|
14 |
<!-- |
|
15 |
.top_border { |
|
16 |
border-top: solid black; |
|
17 |
border-width: 4px; |
|
18 |
} |
|
19 |
.bottom_border { |
|
20 |
border-bottom: solid black; |
|
21 |
border-width: 4px; |
|
22 |
} |
|
23 |
--> |
|
24 |
</style> |
|
25 |
|
|
13 | 26 |
[% IF MESSAGE %] |
14 | 27 |
<p>[% MESSAGE %]</p> |
15 | 28 |
[% END %] |
... | ... | |
33 | 46 |
|
34 | 47 |
[% FOREACH row = ROWS %] |
35 | 48 |
[% IF row.IS_CONTROL %] |
36 |
[% IF row.IS_SEPARATOR %]<tr><td colspan="[% row.NUM_COLUMNS %]"><hr size="3" noshade></td></tr>[% END %][% IF row.IS_COLSPAN_DATA %]<tr><td colspan="[% row.NUM_COLUMNS %]">[% row.data %]</td></tr>[% END %]
|
|
49 |
[% IF row.IS_COLSPAN_DATA %]<tr><td colspan="[% row.NUM_COLUMNS %]">[% row.data %]</td></tr>[% END %] |
|
37 | 50 |
[% ELSE %] |
38 | 51 |
<tr class="listrow[% row.outer_idx_odd %]"> |
39 |
[% FOREACH col = row.COLUMNS %]<td[% IF col.align %] align="[% col.align %]"[% END %][% IF col.valign %] valign="[% col.valign %]"[% END %][% IF col.class %] class="[% col.class %]"[% END %]>[% 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 %]<a href="[% cell_row.link %]">[% END %][% cell_row.data %][% IF cell_row.link %]</a>[% END %][% END %][% UNLESS iterator.last %]<br>[% END %][% END %]</td> |
|
40 |
[% END %] |
|
52 |
[%- FOREACH col = row.COLUMNS %] |
|
53 |
<td[% IF col.align %] align="[% col.align %]"[% END %] |
|
54 |
[%- IF col.valign %] valign="[% col.valign %]"[%- END %] |
|
55 |
[%- SET tdclass = '' %] |
|
56 |
[%- IF row.BORDER_TOP %][%- SET tdclass = "$tdclass top_border" %][%- END %] |
|
57 |
[%- IF row.BORDER_BOTTOM %][%- SET tdclass = "$tdclass bottom_border" %][%- END %] |
|
58 |
[%- IF col.class %][%- SET tdclass = "$tdclass $col.class" %][%- END %] |
|
59 |
[%- IF tdclass %] class="[% tdclass %]"[%- END %]> |
|
60 |
[%- IF col.raw_data %][%- col.raw_data %][%- END %] |
|
61 |
[%- USE iterator(col.CELL_ROWS) %][%- FOREACH cell_row = iterator %] |
|
62 |
[%- IF cell_row.data %] |
|
63 |
[%- IF cell_row.link %]<a href="[% cell_row.link %]">[%- END %] |
|
64 |
[%- cell_row.data %] |
|
65 |
[%- IF cell_row.link %]</a>[%- END %] |
|
66 |
[%- END %] |
|
67 |
[%- UNLESS iterator.last %]<br>[%- END %] |
|
68 |
[%- END %] |
|
69 |
</td> |
|
70 |
[%- END %] |
|
41 | 71 |
</tr> |
42 | 72 |
[% END %] |
43 | 73 |
[% END %] |
templates/webpages/report_generator/html_report_master.html | ||
---|---|---|
10 | 10 |
--> |
11 | 11 |
</script> |
12 | 12 |
|
13 |
<style type="text/css"> |
|
14 |
<!-- |
|
15 |
.top_border { |
|
16 |
border-top: solid black; |
|
17 |
border-width: 4px; |
|
18 |
} |
|
19 |
.bottom_border { |
|
20 |
border-bottom: solid black; |
|
21 |
border-width: 4px; |
|
22 |
} |
|
23 |
--> |
|
24 |
</style> |
|
25 |
|
|
13 | 26 |
[% IF MESSAGE %] |
14 | 27 |
<p>[% MESSAGE %]</p> |
15 | 28 |
[% END %] |
... | ... | |
33 | 46 |
|
34 | 47 |
[% FOREACH row = ROWS %] |
35 | 48 |
[% IF row.IS_CONTROL %] |
36 |
[% IF row.IS_SEPARATOR %]<tr><td colspan="[% row.NUM_COLUMNS %]"><hr size="3" noshade></td></tr>[% END %][% IF row.IS_COLSPAN_DATA %]<tr><td colspan="[% row.NUM_COLUMNS %]">[% row.data %]</td></tr>[% END %]
|
|
49 |
[% IF row.IS_COLSPAN_DATA %]<tr><td colspan="[% row.NUM_COLUMNS %]">[% row.data %]</td></tr>[% END %] |
|
37 | 50 |
[% ELSE %] |
38 | 51 |
<tr class="listrow[% row.outer_idx_odd %]"> |
39 |
[% FOREACH col = row.COLUMNS %]<td[% IF col.align %] align="[% col.align %]"[% END %][% IF col.valign %] valign="[% col.valign %]"[% END %][% IF col.class %] class="[% col.class %]"[% END %]>[% 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 %]<a href="[% cell_row.link %]">[% END %][% cell_row.data %][% IF cell_row.link %]</a>[% END %][% END %][% UNLESS iterator.last %]<br>[% END %][% END %]</td> |
|
40 |
[% END %] |
|
52 |
[%- FOREACH col = row.COLUMNS %] |
|
53 |
<td[% IF col.align %] align="[% col.align %]"[% END %] |
|
54 |
[%- IF col.valign %] valign="[% col.valign %]"[%- END %] |
|
55 |
[%- SET tdclass = '' %] |
|
56 |
[%- IF row.BORDER_TOP %][%- SET tdclass = "$tdclass top_border" %][%- END %] |
|
57 |
[%- IF row.BORDER_BOTTOM %][%- SET tdclass = "$tdclass bottom_border" %][%- END %] |
|
58 |
[%- IF col.class %][%- SET tdclass = "$tdclass $col.class" %][%- END %] |
|
59 |
[%- IF tdclass %] class="[% tdclass %]"[%- END %]> |
|
60 |
[%- IF col.raw_data %][%- col.raw_data %][%- END %] |
|
61 |
[%- USE iterator(col.CELL_ROWS) %][%- FOREACH cell_row = iterator %] |
|
62 |
[%- IF cell_row.data %] |
|
63 |
[%- IF cell_row.link %]<a href="[% cell_row.link %]">[%- END %] |
|
64 |
[%- cell_row.data %] |
|
65 |
[%- IF cell_row.link %]</a>[%- END %] |
|
66 |
[%- END %] |
|
67 |
[%- UNLESS iterator.last %]<br>[%- END %] |
|
68 |
[%- END %] |
|
69 |
</td> |
|
70 |
[%- END %] |
|
41 | 71 |
</tr> |
42 | 72 |
[% END %] |
43 | 73 |
[% END %] |
Auch abrufbar als: Unified diff
Trennstriche in Berichten als Rahmen der Tabellenzellen zeichnen, nicht als <hr>.