From c44615e926a7cf04008baec9487383a9f2f7070b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 1 Apr 2016 10:27:28 +0200 Subject: [PATCH] =?utf8?q?ReportGenerator:=20Unterst=C3=BCtzung=20f=C3=BCr?= =?utf8?q?=20raw=5Fdata-Attribut=20in=20Spaltendefinitionen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Analog zu Zellendaten: ist bei einer Spaltenüberschrift raw_data gesetzt, so wird das ausgegeben. Nur andernfalls werden die Attribute link, text und der Sortier-Indikator ausgegeben. Damit ist es z.B. möglich, in der Spaltenüberschrift eine »Check-All«-Checkbox zu rendern. --- SL/ReportGenerator.pm | 1 + templates/webpages/report_generator/html_report.html | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 65a1492af..368e695a3 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -287,6 +287,7 @@ sub prepare_html_content { 'align' => $column->{align}, 'link' => $column->{link}, 'text' => $column->{text}, + 'raw_data' => $column->{raw_data}, 'show_sort_indicator' => $name eq $opts->{sort_indicator_column}, 'sort_indicator_direction' => $opts->{sort_indicator_direction}, }; diff --git a/templates/webpages/report_generator/html_report.html b/templates/webpages/report_generator/html_report.html index 1430969dd..2be80a3c5 100644 --- a/templates/webpages/report_generator/html_report.html +++ b/templates/webpages/report_generator/html_report.html @@ -35,10 +35,14 @@ [%- 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 -%] - [%- col.text -%] - [%- IF col.show_sort_indicator -%][%- END -%] - [%- IF col.link -%][%- END -%] + [%- IF col.raw_data %] + [% col.raw_data %] + [% ELSE %] + [%- IF col.link -%][%- END -%] + [%- col.text -%] + [%- IF col.show_sort_indicator -%][%- END -%] + [%- IF col.link -%][%- END -%] + [%- END %] [% END %] -- 2.20.1