Revision 1e987ead
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/ReportGenerator.pm | ||
---|---|---|
121 | 121 |
$row->{$column}->{align} = $self->{columns}->{$column}->{align} unless (defined $row->{$column}->{align}); |
122 | 122 |
} |
123 | 123 |
|
124 |
foreach my $field (qw(data link)) { |
|
124 |
foreach my $field (qw(data link link_class)) {
|
|
125 | 125 |
map { $row->{$_}->{$field} = [ $row->{$_}->{$field} ] if (ref $row->{$_}->{$field} ne 'ARRAY') } keys %{ $row }; |
126 | 126 |
} |
127 | 127 |
} |
... | ... | |
351 | 351 |
push @{ $col->{CELL_ROWS} }, { |
352 | 352 |
'data' => '' . $self->html_format($col->{data}->[$i]), |
353 | 353 |
'link' => $col->{link}->[$i], |
354 |
link_class => $col->{link_class}->[$i], |
|
354 | 355 |
}; |
355 | 356 |
} |
356 | 357 |
|
templates/webpages/report_generator/html_report.html | ||
---|---|---|
35 | 35 |
[%- IF col.align %] align="[% HTML.escape(col.align) %]" style="text-align: [% HTML.escape(col.align) %]"[% END -%] |
36 | 36 |
[%- IF col.colspan && col.colspan > 1 %] colspan="[% HTML.escape(col.colspan) %]"[% END -%] |
37 | 37 |
> |
38 |
[%- IF col.link -%]<a class='report-generator-header-link' href="[% HTML.escape(col.link) %]">[%- END -%]
|
|
38 |
[%- IF col.link -%]<a class="[% col.link_class ? col.link_class : 'report-generator-header-link' %]" href="[% HTML.escape(col.link) %]">[%- END -%]
|
|
39 | 39 |
[%- col.text -%] |
40 | 40 |
[%- IF col.show_sort_indicator -%]<img border="0" src="image/[% IF col.sort_indicator_direction %]down[% ELSE %]up[% END %].png">[%- END -%] |
41 | 41 |
[%- IF col.link -%]</a>[%- END -%] |
... | ... | |
63 | 63 |
[%- ELSE %] |
64 | 64 |
[%- USE iterator(col.CELL_ROWS) %][%- FOREACH cell_row = iterator %] |
65 | 65 |
[%- IF cell_row.data != '' %] |
66 |
[%- IF cell_row.link %]<a href="[% HTML.escape(cell_row.link) %]">[%- END %] |
|
66 |
[%- IF cell_row.link %]<a href="[% HTML.escape(cell_row.link) %]"[% IF cell_row.link_class %] class="[% cell_row.link_class %]"[% END %]>[%- END %]
|
|
67 | 67 |
[%- cell_row.data %] |
68 | 68 |
[%- IF cell_row.link %]</a>[%- END %] |
69 | 69 |
[%- END %] |
... | ... | |
126 | 126 |
|
127 | 127 |
</form> |
128 | 128 |
[% END %] |
129 |
|
Auch abrufbar als: Unified diff
ReportGenerator: class für Links angeben können