Revision 675ce315
Von Hans Peter Schlaepfer vor mehr als 3 Jahren hinzugefügt
templates/webpages/csv_import/report.html | ||
---|---|---|
2 | 2 |
[% USE LxERP %] |
3 | 3 |
[% USE L %] |
4 | 4 |
<h2> |
5 |
[%- IF SELF.report.test_mode %]
|
|
6 |
[%- LxERP.t8('Import preview') %]
|
|
7 |
[%- ELSE %]
|
|
8 |
[%- LxERP.t8('Import result') %]
|
|
9 |
[%- END %]
|
|
10 |
[%- IF SELF.num_errors -%]
|
|
5 |
[% IF SELF.report.test_mode %] |
|
6 |
[% LxERP.t8('Import preview') %] |
|
7 |
[% ELSE %] |
|
8 |
[% LxERP.t8('Import result') %] |
|
9 |
[% END %] |
|
10 |
[% IF SELF.num_errors %]
|
|
11 | 11 |
<font color="red">([%- SELF.num_errors -%] [%- LxERP.t8('Errors') -%])</font> |
12 |
[%- END -%]
|
|
12 |
[% END %]
|
|
13 | 13 |
</h2> |
14 | 14 |
|
15 |
[%- IF SELF.report.test_mode %]
|
|
15 |
[% IF SELF.report.test_mode %] |
|
16 | 16 |
<p> |
17 | 17 |
[% LxERP.t8("The following is only a preview.") %] |
18 | 18 |
[% LxERP.t8("No entries have been imported yet.") %] |
19 | 19 |
</p> |
20 |
[%- END %]
|
|
20 |
[% END %] |
|
21 | 21 |
|
22 |
[%- PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %]
|
|
22 |
[% PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %] |
|
23 | 23 |
<table> |
24 | 24 |
|
25 |
[%- SET max_col = 0 %]
|
|
26 |
[%- FOREACH rownum = SELF.display_rows %]
|
|
27 |
[%- SET max_col = max_col > SELF.report_rows.${rownum}.size ? max_col : SELF.report_rows.${rownum}.size %]
|
|
28 |
[%- LAST IF rownum >= SELF.report_numheaders %]
|
|
29 |
[%- END %]
|
|
25 |
[% SET max_col = 0 %] |
|
26 |
[% FOREACH rownum = SELF.display_rows %] |
|
27 |
[% SET max_col = max_col > SELF.report_rows.${rownum}.size ? max_col : SELF.report_rows.${rownum}.size %] |
|
28 |
[% LAST IF rownum >= SELF.report_numheaders %] |
|
29 |
[% END %] |
|
30 | 30 |
|
31 |
[%- FOREACH rownum = SELF.display_rows %]
|
|
32 |
[%- SET to_pad = max_col - SELF.report_rows.${rownum}.size %]
|
|
33 |
[%- IF rownum < SELF.report_numheaders %]
|
|
34 |
<tr class="listheading">
|
|
35 |
[%- FOREACH value = SELF.report_rows.${rownum} %]
|
|
31 |
[% FOREACH rownum = SELF.display_rows %] |
|
32 |
[% SET to_pad = max_col - SELF.report_rows.${rownum}.size %] |
|
33 |
[% IF rownum < SELF.report_numheaders %] |
|
34 |
<tr> |
|
35 |
[% FOREACH value = SELF.report_rows.${rownum} %] |
|
36 | 36 |
<th>[% value | html %]</th> |
37 |
[%- END %]
|
|
38 |
[%- IF to_pad -%]<th style="text-align:center" colspan="[%- to_pad -%]">-</th>[%- END -%]
|
|
39 |
<th>[%- LxERP.t8('Notes') %]</th>
|
|
37 |
[% END %] |
|
38 |
[% IF to_pad %]<th style="text-align:center" colspan="[% to_pad %]">-</th>[% END %]
|
|
39 |
<th>[% LxERP.t8('Notes') %]</th> |
|
40 | 40 |
</tr> |
41 |
[%- ELSE %]
|
|
41 |
[% ELSE %] |
|
42 | 42 |
[% csv_import_report_errors = SELF.report_status.${rownum}.errors %] |
43 | 43 |
<tr class="listrow[% IF csv_import_report_errors && csv_import_report_errors.size %]_error[% END %][% (loop.count + SELF.report_numheaders) % 2 %]"> |
44 |
[%- FOREACH value = SELF.report_rows.${rownum} %]
|
|
45 |
<td>[%- value | html %]</td>
|
|
46 |
[%- END %]
|
|
47 |
[%- IF to_pad -%]<td align="center" colspan="[%- to_pad -%]">-</td>[%- END -%]
|
|
44 |
[% FOREACH value = SELF.report_rows.${rownum} %] |
|
45 |
<td>[% value | html %]</td> |
|
46 |
[% END %] |
|
47 |
[% IF to_pad %]<td colspan="[% to_pad %]">-</td>[% END %]
|
|
48 | 48 |
<td> |
49 |
[%- FOREACH error = csv_import_report_errors %][%- error | html %][% UNLESS loop.last %]<br>[%- END %][%- END %]
|
|
50 |
[%- FOREACH info = SELF.report_status.${rownum}.information %][% IF rownum >= SELF.report_numheaders || csv_import_report_errors.size %]<br>[%- END %][%- info | html %][%- END %]
|
|
49 |
[% FOREACH error = csv_import_report_errors %][% error | html %][% UNLESS loop.last %]<br>[% END %][% END %]
|
|
50 |
[% FOREACH info = SELF.report_status.${rownum}.information %][% IF rownum >= SELF.report_numheaders || csv_import_report_errors.size %]<br>[% END %][% info | html %][% END %]
|
|
51 | 51 |
</td> |
52 | 52 |
</tr> |
53 |
[%- END %]
|
|
54 |
[%- END %]
|
|
53 |
[% END %] |
|
54 |
[% END %] |
|
55 | 55 |
|
56 | 56 |
</table> |
57 | 57 |
|
58 |
[%- PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %]
|
|
58 |
[% PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %] |
|
59 | 59 |
|
60 | 60 |
<script type='text/javascript'> |
61 | 61 |
$(function(){ |
62 |
[%- IF SELF.reporterror %]
|
|
62 |
[% IF SELF.reporterror %] |
|
63 | 63 |
kivi.clear_flash('info',0); |
64 | 64 |
kivi.display_flash('error','[% SELF.reporterror %]',0); |
65 |
[%- ELSIF SELF.report.test_mode %]
|
|
65 |
[% ELSIF SELF.report.test_mode %] |
|
66 | 66 |
kivi.ActionBar.Action('#action_import').enable(); |
67 |
[%- END %]
|
|
67 |
[% END %] |
|
68 | 68 |
}); |
69 | 69 |
</script> |
Auch abrufbar als: Unified diff
Design 4.0: Aenderungen in templates/webpages/csv_import/..