Revision 723b79bd
Von Moritz Bunkus vor etwa 17 Jahren hinzugefügt
SL/ReportGenerator.pm | ||
---|---|---|
420 | 420 |
$form->error($locale->text('Could not write the temporary HTML file.')); |
421 | 421 |
} |
422 | 422 |
|
423 |
$html_file->print($form->parse_html_template('report_generator/pdf_report', $variables)); |
|
423 |
$html_file->print($form->parse_html_template2('report_generator/pdf_report', $variables));
|
|
424 | 424 |
$html_file->close(); |
425 | 425 |
|
426 | 426 |
my $cmdline = |
bin/mozilla/reportgenerator.pl | ||
---|---|---|
44 | 44 |
|
45 | 45 |
$form->{title} = $locale->text('PDF export -- options'); |
46 | 46 |
$form->header(); |
47 |
print $form->parse_html_template('report_generator/pdf_export_options', |
|
48 |
{ 'HIDDEN' => \@form_values, |
|
49 |
'default_margin' => $form->format_amount(\%myconfig, 1.5), |
|
50 |
'SHOW_PRINTERS' => scalar @{ $form->{ALL_PRINTERS} }, |
|
51 |
}); |
|
47 |
print $form->parse_html_template2('report_generator/pdf_export_options', { 'HIDDEN' => \@form_values }); |
|
52 | 48 |
|
53 | 49 |
$lxdebug->leave_sub(); |
54 | 50 |
} |
... | ... | |
67 | 63 |
|
68 | 64 |
$form->{title} = $locale->text('CSV export -- options'); |
69 | 65 |
$form->header(); |
70 |
print $form->parse_html_template('report_generator/csv_export_options', { 'HIDDEN' => \@form_values }); |
|
66 |
print $form->parse_html_template2('report_generator/csv_export_options', { 'HIDDEN' => \@form_values });
|
|
71 | 67 |
|
72 | 68 |
$lxdebug->leave_sub(); |
73 | 69 |
} |
templates/webpages/report_generator/csv_export_options_de.html | ||
---|---|---|
1 |
<body> |
|
1 |
[% USE HTML %]<body>
|
|
2 | 2 |
|
3 | 3 |
<script type="text/javascript"> |
4 | 4 |
<!-- |
... | ... | |
10 | 10 |
--> |
11 | 11 |
</script> |
12 | 12 |
|
13 |
<div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
|
|
13 |
<div class="listheading" width="100%">[% HTML.escape(title) %]</div>
|
|
14 | 14 |
|
15 |
<form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
|
|
15 |
<form action="[% HTML.escape(script) %]" method="post" name="report_generator_form">
|
|
16 | 16 |
|
17 |
<TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>"> |
|
18 |
</TMPL_LOOP> |
|
17 |
[%- FOREACH var = HIDDEN %] |
|
18 |
<input type="hidden" name="[% HTML.escape(var.key) %]" value="[% HTML.escape(var.value) %]"> |
|
19 |
[%- END %] |
|
19 | 20 |
|
20 | 21 |
<input type="hidden" name="report_generator_csv_options_set" value="1"> |
21 | 22 |
<input type="hidden" name="report_generator_dispatch_to" value=""> |
templates/webpages/report_generator/csv_export_options_master.html | ||
---|---|---|
1 |
<body> |
|
1 |
[% USE HTML %]<body>
|
|
2 | 2 |
|
3 | 3 |
<script type="text/javascript"> |
4 | 4 |
<!-- |
... | ... | |
10 | 10 |
--> |
11 | 11 |
</script> |
12 | 12 |
|
13 |
<div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
|
|
13 |
<div class="listheading" width="100%">[% HTML.escape(title) %]</div>
|
|
14 | 14 |
|
15 |
<form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
|
|
15 |
<form action="[% HTML.escape(script) %]" method="post" name="report_generator_form">
|
|
16 | 16 |
|
17 |
<TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>"> |
|
18 |
</TMPL_LOOP> |
|
17 |
[%- FOREACH var = HIDDEN %] |
|
18 |
<input type="hidden" name="[% HTML.escape(var.key) %]" value="[% HTML.escape(var.value) %]"> |
|
19 |
[%- END %] |
|
19 | 20 |
|
20 | 21 |
<input type="hidden" name="report_generator_csv_options_set" value="1"> |
21 | 22 |
<input type="hidden" name="report_generator_dispatch_to" value=""> |
templates/webpages/report_generator/pdf_export_options_de.html | ||
---|---|---|
1 |
<body> |
|
1 |
[% USE HTML %][% USE LxERP %]<body> |
|
2 |
|
|
3 |
[%- SET default_margin = LxERP.format_amount(1.5) %] |
|
2 | 4 |
|
3 | 5 |
<script type="text/javascript"> |
4 | 6 |
<!-- |
... | ... | |
10 | 12 |
--> |
11 | 13 |
</script> |
12 | 14 |
|
13 |
<div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
|
|
15 |
<div class="listheading" width="100%">[% HTML.escape(title) %]</div>
|
|
14 | 16 |
|
15 |
<form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
|
|
17 |
<form action="[% HTML.escape(script) %]" method="post" name="report_generator_form">
|
|
16 | 18 |
|
17 |
<TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>"> |
|
18 |
</TMPL_LOOP> |
|
19 |
[%- FOREACH var = HIDDEN %] |
|
20 |
<input type="hidden" name="[% HTML.escape(var.key) %]" value="[% HTML.escape(var.value) %]"> |
|
21 |
[%- END %] |
|
19 | 22 |
|
20 | 23 |
<input type="hidden" name="report_generator_pdf_options_set" value="1"> |
21 | 24 |
<input type="hidden" name="report_generator_dispatch_to" value=""> |
... | ... | |
40 | 43 |
|
41 | 44 |
<tr> |
42 | 45 |
<td align="right">Schriftgröße</td> |
43 |
<td><input name="report_generator_pdf_options_font_size" size="4" value="10">pt</td> |
|
46 |
<td><input name="report_generator_pdf_options_font_size" size="4" value="10"> pt</td>
|
|
44 | 47 |
</tr> |
45 | 48 |
|
46 | 49 |
<tr> |
... | ... | |
49 | 52 |
|
50 | 53 |
<tr> |
51 | 54 |
<td align="right">Oben</td> |
52 |
<td><input name="report_generator_pdf_options_margin_top" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
|
|
55 |
<td><input name="report_generator_pdf_options_margin_top" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
|
|
53 | 56 |
</tr> |
54 | 57 |
|
55 | 58 |
<tr> |
56 | 59 |
<td align="right">Links</td> |
57 |
<td><input name="report_generator_pdf_options_margin_left" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
|
|
60 |
<td><input name="report_generator_pdf_options_margin_left" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
|
|
58 | 61 |
</tr> |
59 | 62 |
|
60 | 63 |
<tr> |
61 | 64 |
<td align="right">Unten</td> |
62 |
<td><input name="report_generator_pdf_options_margin_bottom" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
|
|
65 |
<td><input name="report_generator_pdf_options_margin_bottom" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
|
|
63 | 66 |
</tr> |
64 | 67 |
|
65 | 68 |
<tr> |
66 | 69 |
<td align="right">Rechts</td> |
67 |
<td><input name="report_generator_pdf_options_margin_right" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
|
|
70 |
<td><input name="report_generator_pdf_options_margin_right" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
|
|
68 | 71 |
</tr> |
69 | 72 |
|
70 | 73 |
<tr> |
... | ... | |
72 | 75 |
<td valign="top"> |
73 | 76 |
<input type="checkbox" name="report_generator_pdf_options_number" value="1" checked> |
74 | 77 |
Seiten nummerieren |
75 |
<TMPL_IF SHOW_PRINTERS>
|
|
78 |
[% IF ALL_PRINTERS.size %]
|
|
76 | 79 |
<br> |
77 | 80 |
<input type="checkbox" name="report_generator_pdf_options_print" value="1"> |
78 | 81 |
Liste ausdrucken |
79 |
</TMPL_IF>
|
|
82 |
[% END %]
|
|
80 | 83 |
</td> |
81 | 84 |
</tr> |
82 | 85 |
|
83 |
<TMPL_IF SHOW_PRINTERS>
|
|
86 |
[% IF ALL_PRINTERS.size %]
|
|
84 | 87 |
<tr> |
85 | 88 |
<td align="right">Drucker</td> |
86 | 89 |
<td> |
87 | 90 |
<select name="report_generator_pdf_options_printer_id"> |
88 |
<TMPL_LOOP ALL_PRINTERS><option value="<TMPL_VAR id ESCAPE=HTML>"<TMPL_IF selected> selected</TMPL_IF>><TMPL_VAR printer_description ESCAPE=HTML></option></TMPL_LOOP> |
|
91 |
[%- FOREACH printer = ALL_PRINTERS %] |
|
92 |
<option value="[% HTML.escape(printer.id) %]"[% IF printer.selected %] selected[% END %]>[% HTML.escape(printer.printer_description) %]</option> |
|
93 |
[%- END %] |
|
89 | 94 |
</select> |
90 | 95 |
</td> |
91 | 96 |
</tr> |
92 | 97 |
|
93 | 98 |
<tr> |
94 | 99 |
<td align="right">Kopien</td> |
95 |
<td><input name="report_generator_pdf_options_copies" size="4" value="<TMPL_VAR copies ESCAPE=HTML>"></td>
|
|
100 |
<td><input name="report_generator_pdf_options_copies" size="4" value="[% HTML.escape(copies) %]"></td>
|
|
96 | 101 |
</tr> |
97 |
</TMPL_IF>
|
|
102 |
[% END %]
|
|
98 | 103 |
</table> |
99 | 104 |
|
100 | 105 |
<p> |
templates/webpages/report_generator/pdf_export_options_master.html | ||
---|---|---|
1 |
<body> |
|
1 |
[% USE HTML %][% USE LxERP %]<body> |
|
2 |
|
|
3 |
[%- SET default_margin = LxERP.format_amount(1.5) %] |
|
2 | 4 |
|
3 | 5 |
<script type="text/javascript"> |
4 | 6 |
<!-- |
... | ... | |
10 | 12 |
--> |
11 | 13 |
</script> |
12 | 14 |
|
13 |
<div class="listheading" width="100%"><TMPL_VAR title ESCAPE=HTML></div>
|
|
15 |
<div class="listheading" width="100%">[% HTML.escape(title) %]</div>
|
|
14 | 16 |
|
15 |
<form action="<TMPL_VAR script ESCAPE=HTML>" method="post" name="report_generator_form">
|
|
17 |
<form action="[% HTML.escape(script) %]" method="post" name="report_generator_form">
|
|
16 | 18 |
|
17 |
<TMPL_LOOP HIDDEN><input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>"> |
|
18 |
</TMPL_LOOP> |
|
19 |
[%- FOREACH var = HIDDEN %] |
|
20 |
<input type="hidden" name="[% HTML.escape(var.key) %]" value="[% HTML.escape(var.value) %]"> |
|
21 |
[%- END %] |
|
19 | 22 |
|
20 | 23 |
<input type="hidden" name="report_generator_pdf_options_set" value="1"> |
21 | 24 |
<input type="hidden" name="report_generator_dispatch_to" value=""> |
... | ... | |
40 | 43 |
|
41 | 44 |
<tr> |
42 | 45 |
<td align="right"><translate>Font size</translate></td> |
43 |
<td><input name="report_generator_pdf_options_font_size" size="4" value="10">pt</td> |
|
46 |
<td><input name="report_generator_pdf_options_font_size" size="4" value="10"> pt</td>
|
|
44 | 47 |
</tr> |
45 | 48 |
|
46 | 49 |
<tr> |
... | ... | |
49 | 52 |
|
50 | 53 |
<tr> |
51 | 54 |
<td align="right"><translate>Top</translate></td> |
52 |
<td><input name="report_generator_pdf_options_margin_top" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
|
|
55 |
<td><input name="report_generator_pdf_options_margin_top" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
|
|
53 | 56 |
</tr> |
54 | 57 |
|
55 | 58 |
<tr> |
56 | 59 |
<td align="right"><translate>Left</translate></td> |
57 |
<td><input name="report_generator_pdf_options_margin_left" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
|
|
60 |
<td><input name="report_generator_pdf_options_margin_left" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
|
|
58 | 61 |
</tr> |
59 | 62 |
|
60 | 63 |
<tr> |
61 | 64 |
<td align="right"><translate>Bottom</translate></td> |
62 |
<td><input name="report_generator_pdf_options_margin_bottom" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
|
|
65 |
<td><input name="report_generator_pdf_options_margin_bottom" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
|
|
63 | 66 |
</tr> |
64 | 67 |
|
65 | 68 |
<tr> |
66 | 69 |
<td align="right"><translate>Right</translate></td> |
67 |
<td><input name="report_generator_pdf_options_margin_right" size="4" value="<TMPL_VAR default_margin ESCAPE=HTML>">cm</td>
|
|
70 |
<td><input name="report_generator_pdf_options_margin_right" size="4" value="[% HTML.escape(default_margin) %]"> cm</td>
|
|
68 | 71 |
</tr> |
69 | 72 |
|
70 | 73 |
<tr> |
... | ... | |
72 | 75 |
<td valign="top"> |
73 | 76 |
<input type="checkbox" name="report_generator_pdf_options_number" value="1" checked> |
74 | 77 |
<translate>Number pages</translate> |
75 |
<TMPL_IF SHOW_PRINTERS>
|
|
78 |
[% IF ALL_PRINTERS.size %]
|
|
76 | 79 |
<br> |
77 | 80 |
<input type="checkbox" name="report_generator_pdf_options_print" value="1"> |
78 | 81 |
<translate>Print list</translate> |
79 |
</TMPL_IF>
|
|
82 |
[% END %]
|
|
80 | 83 |
</td> |
81 | 84 |
</tr> |
82 | 85 |
|
83 |
<TMPL_IF SHOW_PRINTERS>
|
|
86 |
[% IF ALL_PRINTERS.size %]
|
|
84 | 87 |
<tr> |
85 | 88 |
<td align="right"><translate>Printer</translate></td> |
86 | 89 |
<td> |
87 | 90 |
<select name="report_generator_pdf_options_printer_id"> |
88 |
<TMPL_LOOP ALL_PRINTERS><option value="<TMPL_VAR id ESCAPE=HTML>"<TMPL_IF selected> selected</TMPL_IF>><TMPL_VAR printer_description ESCAPE=HTML></option></TMPL_LOOP> |
|
91 |
[%- FOREACH printer = ALL_PRINTERS %] |
|
92 |
<option value="[% HTML.escape(printer.id) %]"[% IF printer.selected %] selected[% END %]>[% HTML.escape(printer.printer_description) %]</option> |
|
93 |
[%- END %] |
|
89 | 94 |
</select> |
90 | 95 |
</td> |
91 | 96 |
</tr> |
92 | 97 |
|
93 | 98 |
<tr> |
94 | 99 |
<td align="right"><translate>Copies</translate></td> |
95 |
<td><input name="report_generator_pdf_options_copies" size="4" value="<TMPL_VAR copies ESCAPE=HTML>"></td>
|
|
100 |
<td><input name="report_generator_pdf_options_copies" size="4" value="[% HTML.escape(copies) %]"></td>
|
|
96 | 101 |
</tr> |
97 |
</TMPL_IF>
|
|
102 |
[% END %]
|
|
98 | 103 |
</table> |
99 | 104 |
|
100 | 105 |
<p> |
templates/webpages/report_generator/pdf_report_de.html | ||
---|---|---|
1 |
<html> |
|
1 |
[% USE HTML %]<html>
|
|
2 | 2 |
<body> |
3 | 3 |
|
4 |
<div width="100%"><TMPL_VAR TITLE></div>
|
|
4 |
<div width="100%">[% TITLE %]</div>
|
|
5 | 5 |
|
6 |
<TMPL_IF TOP_INFO_TEXT>
|
|
7 |
<p><TMPL_VAR TOP_INFO_TEXT></p>
|
|
8 |
</TMPL_IF>
|
|
6 |
[%- IF TOP_INFO_TEXT %]
|
|
7 |
<p>[% TOP_INFO_TEXT %]</p>
|
|
8 |
[%- END %]
|
|
9 | 9 |
|
10 | 10 |
<p> |
11 | 11 |
<table width="100%"> |
12 | 12 |
<tr> |
13 |
<TMPL_LOOP COLUMN_HEADERS>
|
|
14 |
<th><TMPL_IF link><a href="<TMPL_VAR link>"></TMPL_IF><TMPL_VAR text ESCAPE=HTML><TMPL_IF link></a></TMPL_IF></th>
|
|
15 |
</TMPL_LOOP>
|
|
13 |
[%- FOREACH col = COLUMN_HEADERS %]
|
|
14 |
<th>[% IF col.link %]<a href="[% col.link %]">[% END %][% HTML.escape(col.text) %][% IF col.link %]</a>[% END %]</th>
|
|
15 |
[%- END %]
|
|
16 | 16 |
</tr> |
17 | 17 |
|
18 |
<TMPL_LOOP ROWS> |
|
19 |
<tr> |
|
20 |
<TMPL_LOOP COLUMNS><td<TMPL_IF align> align="<TMPL_VAR align>"</TMPL_IF><TMPL_IF valign> valign="<TMPL_VAR valign>"</TMPL_IF>><TMPL_LOOP CELL_ROWS><TMPL_IF data><TMPL_VAR data></TMPL_IF><TMPL_UNLESS __last__><br></TMPL_UNLESS></TMPL_LOOP></td></TMPL_LOOP> |
|
21 |
</tr> |
|
22 |
</TMPL_LOOP> |
|
18 |
[%- FOREACH row = ROWS %] |
|
19 |
<tr> |
|
20 |
[%- FOREACH col = row.COLUMNS %] |
|
21 |
<td[% IF col.align %] align="[% col.align %]"[% END %][% IF col.valign %] valign="[% col.valign %]"[% END %]> |
|
22 |
[%- FOREACH cell_row = col.CELL_ROWS %][%- cell_row.data %][%- UNLESS loop.last %]<br>[%- END %][%- END %] |
|
23 |
</td> |
|
24 |
[%- END %] |
|
25 |
</tr> |
|
26 |
[%- END %] |
|
23 | 27 |
|
24 | 28 |
</table> |
25 | 29 |
</p> |
26 | 30 |
|
27 |
<TMPL_IF BOTTOM_INFO_TEXT>
|
|
28 |
<p><TMPL_VAR BOTTOM_INFO_TEXT></p>
|
|
29 |
</TMPL_IF>
|
|
31 |
[%- IF BOTTOM_INFO_TEXT %]
|
|
32 |
<p>[% BOTTOM_INFO_TEXT %]</p>
|
|
33 |
[%- END %]
|
|
30 | 34 |
|
31 | 35 |
</body> |
32 | 36 |
</html> |
templates/webpages/report_generator/pdf_report_master.html | ||
---|---|---|
1 |
<html> |
|
1 |
[% USE HTML %]<html>
|
|
2 | 2 |
<body> |
3 | 3 |
|
4 |
<div width="100%"><TMPL_VAR TITLE></div>
|
|
4 |
<div width="100%">[% TITLE %]</div>
|
|
5 | 5 |
|
6 |
<TMPL_IF TOP_INFO_TEXT>
|
|
7 |
<p><TMPL_VAR TOP_INFO_TEXT></p>
|
|
8 |
</TMPL_IF>
|
|
6 |
[%- IF TOP_INFO_TEXT %]
|
|
7 |
<p>[% TOP_INFO_TEXT %]</p>
|
|
8 |
[%- END %]
|
|
9 | 9 |
|
10 | 10 |
<p> |
11 | 11 |
<table width="100%"> |
12 | 12 |
<tr> |
13 |
<TMPL_LOOP COLUMN_HEADERS>
|
|
14 |
<th><TMPL_IF link><a href="<TMPL_VAR link>"></TMPL_IF><TMPL_VAR text ESCAPE=HTML><TMPL_IF link></a></TMPL_IF></th>
|
|
15 |
</TMPL_LOOP>
|
|
13 |
[%- FOREACH col = COLUMN_HEADERS %]
|
|
14 |
<th>[% IF col.link %]<a href="[% col.link %]">[% END %][% HTML.escape(col.text) %][% IF col.link %]</a>[% END %]</th>
|
|
15 |
[%- END %]
|
|
16 | 16 |
</tr> |
17 | 17 |
|
18 |
<TMPL_LOOP ROWS> |
|
19 |
<tr> |
|
20 |
<TMPL_LOOP COLUMNS><td<TMPL_IF align> align="<TMPL_VAR align>"</TMPL_IF><TMPL_IF valign> valign="<TMPL_VAR valign>"</TMPL_IF>><TMPL_LOOP CELL_ROWS><TMPL_IF data><TMPL_VAR data></TMPL_IF><TMPL_UNLESS __last__><br></TMPL_UNLESS></TMPL_LOOP></td></TMPL_LOOP> |
|
21 |
</tr> |
|
22 |
</TMPL_LOOP> |
|
18 |
[%- FOREACH row = ROWS %] |
|
19 |
<tr> |
|
20 |
[%- FOREACH col = row.COLUMNS %] |
|
21 |
<td[% IF col.align %] align="[% col.align %]"[% END %][% IF col.valign %] valign="[% col.valign %]"[% END %]> |
|
22 |
[%- FOREACH cell_row = col.CELL_ROWS %][%- cell_row.data %][%- UNLESS loop.last %]<br>[%- END %][%- END %] |
|
23 |
</td> |
|
24 |
[%- END %] |
|
25 |
</tr> |
|
26 |
[%- END %] |
|
23 | 27 |
|
24 | 28 |
</table> |
25 | 29 |
</p> |
26 | 30 |
|
27 |
<TMPL_IF BOTTOM_INFO_TEXT>
|
|
28 |
<p><TMPL_VAR BOTTOM_INFO_TEXT></p>
|
|
29 |
</TMPL_IF>
|
|
31 |
[%- IF BOTTOM_INFO_TEXT %]
|
|
32 |
<p>[% BOTTOM_INFO_TEXT %]</p>
|
|
33 |
[%- END %]
|
|
30 | 34 |
|
31 | 35 |
</body> |
32 | 36 |
</html> |
Auch abrufbar als: Unified diff
Umstellung der HTML-Vorlagen aus templates/webpages/report_generator von HTML::Template auf Template.