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