From 723b79bdf889207b36f5ab0edcfd4a6d81c6f8b6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 1 Nov 2007 10:36:08 +0000 Subject: [PATCH] Umstellung der HTML-Vorlagen aus templates/webpages/report_generator von HTML::Template auf Template. --- SL/ReportGenerator.pm | 2 +- bin/mozilla/reportgenerator.pl | 8 +--- .../csv_export_options_de.html | 11 +++--- .../csv_export_options_master.html | 11 +++--- .../pdf_export_options_de.html | 37 +++++++++++-------- .../pdf_export_options_master.html | 37 +++++++++++-------- .../report_generator/pdf_report_de.html | 36 ++++++++++-------- .../report_generator/pdf_report_master.html | 36 ++++++++++-------- 8 files changed, 97 insertions(+), 81 deletions(-) diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index b02ab35ef..c45380f16 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -420,7 +420,7 @@ END $form->error($locale->text('Could not write the temporary HTML file.')); } - $html_file->print($form->parse_html_template('report_generator/pdf_report', $variables)); + $html_file->print($form->parse_html_template2('report_generator/pdf_report', $variables)); $html_file->close(); my $cmdline = diff --git a/bin/mozilla/reportgenerator.pl b/bin/mozilla/reportgenerator.pl index 112116d69..772fe68ef 100644 --- a/bin/mozilla/reportgenerator.pl +++ b/bin/mozilla/reportgenerator.pl @@ -44,11 +44,7 @@ sub report_generator_export_as_pdf { $form->{title} = $locale->text('PDF export -- options'); $form->header(); - print $form->parse_html_template('report_generator/pdf_export_options', - { 'HIDDEN' => \@form_values, - 'default_margin' => $form->format_amount(\%myconfig, 1.5), - 'SHOW_PRINTERS' => scalar @{ $form->{ALL_PRINTERS} }, - }); + print $form->parse_html_template2('report_generator/pdf_export_options', { 'HIDDEN' => \@form_values }); $lxdebug->leave_sub(); } @@ -67,7 +63,7 @@ sub report_generator_export_as_csv { $form->{title} = $locale->text('CSV export -- options'); $form->header(); - print $form->parse_html_template('report_generator/csv_export_options', { 'HIDDEN' => \@form_values }); + print $form->parse_html_template2('report_generator/csv_export_options', { 'HIDDEN' => \@form_values }); $lxdebug->leave_sub(); } diff --git a/templates/webpages/report_generator/csv_export_options_de.html b/templates/webpages/report_generator/csv_export_options_de.html index 1713cadb7..0d2738fb4 100644 --- a/templates/webpages/report_generator/csv_export_options_de.html +++ b/templates/webpages/report_generator/csv_export_options_de.html @@ -1,4 +1,4 @@ - +[% USE HTML %] -
+
[% HTML.escape(title) %]
-
+ - + [%- FOREACH var = HIDDEN %] + + [%- END %] diff --git a/templates/webpages/report_generator/csv_export_options_master.html b/templates/webpages/report_generator/csv_export_options_master.html index 704768289..039a64fa9 100644 --- a/templates/webpages/report_generator/csv_export_options_master.html +++ b/templates/webpages/report_generator/csv_export_options_master.html @@ -1,4 +1,4 @@ - +[% USE HTML %] -
+
[% HTML.escape(title) %]
- + - + [%- FOREACH var = HIDDEN %] + + [%- END %] diff --git a/templates/webpages/report_generator/pdf_export_options_de.html b/templates/webpages/report_generator/pdf_export_options_de.html index 3febc0899..7478bd672 100644 --- a/templates/webpages/report_generator/pdf_export_options_de.html +++ b/templates/webpages/report_generator/pdf_export_options_de.html @@ -1,4 +1,6 @@ - +[% USE HTML %][% USE LxERP %] + + [%- SET default_margin = LxERP.format_amount(1.5) %] -
+
[% HTML.escape(title) %]
- + - + [%- FOREACH var = HIDDEN %] + + [%- END %] @@ -40,7 +43,7 @@ Schriftgröße - pt + pt @@ -49,22 +52,22 @@ Oben - cm + cm Links - cm + cm Unten - cm + cm Rechts - cm + cm @@ -72,29 +75,31 @@ Seiten nummerieren - + [% IF ALL_PRINTERS.size %]
Liste ausdrucken -
+ [% END %] - + [% IF ALL_PRINTERS.size %] Drucker Kopien - + - + [% END %]

diff --git a/templates/webpages/report_generator/pdf_export_options_master.html b/templates/webpages/report_generator/pdf_export_options_master.html index 481a0cd34..c34d58cf4 100644 --- a/templates/webpages/report_generator/pdf_export_options_master.html +++ b/templates/webpages/report_generator/pdf_export_options_master.html @@ -1,4 +1,6 @@ - +[% USE HTML %][% USE LxERP %] + + [%- SET default_margin = LxERP.format_amount(1.5) %] -

+
[% HTML.escape(title) %]
- + - + [%- FOREACH var = HIDDEN %] + + [%- END %] @@ -40,7 +43,7 @@ Font size - pt + pt @@ -49,22 +52,22 @@ Top - cm + cm Left - cm + cm Bottom - cm + cm Right - cm + cm @@ -72,29 +75,31 @@ Number pages - + [% IF ALL_PRINTERS.size %]
Print list -
+ [% END %] - + [% IF ALL_PRINTERS.size %] Printer Copies - + - + [% END %]

diff --git a/templates/webpages/report_generator/pdf_report_de.html b/templates/webpages/report_generator/pdf_report_de.html index 2f3746faa..dac6aa3f9 100644 --- a/templates/webpages/report_generator/pdf_report_de.html +++ b/templates/webpages/report_generator/pdf_report_de.html @@ -1,32 +1,36 @@ - +[% USE HTML %] -

+
[% TITLE %]
- -

-
+ [%- IF TOP_INFO_TEXT %] +

[% TOP_INFO_TEXT %]

+ [%- END %]

- - - + [%- FOREACH col = COLUMN_HEADERS %] + + [%- END %] - - - align="" valign="">
- - + [%- FOREACH row = ROWS %] + + [%- FOREACH col = row.COLUMNS %] + + [%- FOREACH cell_row = col.CELL_ROWS %][%- cell_row.data %][%- UNLESS loop.last %]
[%- END %][%- END %] + + [%- END %] +
+ [%- END %]
[% IF col.link %][% END %][% HTML.escape(col.text) %][% IF col.link %][% END %]

- -

-
+ [%- IF BOTTOM_INFO_TEXT %] +

[% BOTTOM_INFO_TEXT %]

+ [%- END %] diff --git a/templates/webpages/report_generator/pdf_report_master.html b/templates/webpages/report_generator/pdf_report_master.html index 2f3746faa..dac6aa3f9 100644 --- a/templates/webpages/report_generator/pdf_report_master.html +++ b/templates/webpages/report_generator/pdf_report_master.html @@ -1,32 +1,36 @@ - +[% USE HTML %] -
+
[% TITLE %]
- -

-
+ [%- IF TOP_INFO_TEXT %] +

[% TOP_INFO_TEXT %]

+ [%- END %]

- - - + [%- FOREACH col = COLUMN_HEADERS %] + + [%- END %] - - - align="" valign="">
- - + [%- FOREACH row = ROWS %] + + [%- FOREACH col = row.COLUMNS %] + + [%- FOREACH cell_row = col.CELL_ROWS %][%- cell_row.data %][%- UNLESS loop.last %]
[%- END %][%- END %] + + [%- END %] +
+ [%- END %]
[% IF col.link %][% END %][% HTML.escape(col.text) %][% IF col.link %][% END %]

- -

-
+ [%- IF BOTTOM_INFO_TEXT %] +

[% BOTTOM_INFO_TEXT %]

+ [%- END %] -- 2.20.1