Revision 105428c5
Von Bernd Bleßmann vor fast 8 Jahren hinzugefügt
templates/webpages/csv_import/_errors.html | ||
---|---|---|
1 |
[% USE LxERP %] |
|
2 |
|
|
3 |
<h3>[%- LxERP.t8('Errors') %]</h3> |
|
4 |
|
|
5 |
<p>[%- LxERP.t8('Found #1 errors.', SELF.errors.size) %]</p> |
|
6 |
|
|
7 |
<table> |
|
8 |
<tr class="listheading"> |
|
9 |
<th>[%- LxERP.t8('Line and column') %]</th> |
|
10 |
<th>[%- LxERP.t8('Block') %]</th> |
|
11 |
<th>[%- LxERP.t8('Error') %]</th> |
|
12 |
</tr> |
|
13 |
[% FOREACH err = SELF.errors %] |
|
14 |
<tr class="listrow[% loop.count % 2 %]"> |
|
15 |
<td>[% err.4 %]:[% err.3 %]</td> |
|
16 |
<td>[% err.0 %]</td> |
|
17 |
<td>[% err.2 %]</td> |
|
18 |
</tr> |
|
19 |
[% END %] |
|
20 |
</table> |
templates/webpages/csv_import/_preview.html | ||
---|---|---|
1 |
[% USE HTML %] |
|
2 |
[% USE LxERP %] |
|
3 |
|
|
4 |
[% IF SELF.data.size %] |
|
5 |
<h3> |
|
6 |
[%- IF SELF.import_status == 'tested' %] |
|
7 |
[%- LxERP.t8('Import preview') %] |
|
8 |
[%- ELSE %] |
|
9 |
[%- LxERP.t8('Import result') %] |
|
10 |
[%- END %] |
|
11 |
</h3> |
|
12 |
|
|
13 |
<table> |
|
14 |
<tr class="listheading"> |
|
15 |
[%- FOREACH column = SELF.info_headers.headers %] |
|
16 |
<th>[%- HTML.escape(column) %]</th> |
|
17 |
[%- END %] |
|
18 |
[%- FOREACH column = SELF.headers.headers %] |
|
19 |
<th>[%- HTML.escape(column) %]</th> |
|
20 |
[%- END %] |
|
21 |
[%- FOREACH column = SELF.raw_data_headers.headers %] |
|
22 |
<th>[%- HTML.escape(column) %]</th> |
|
23 |
[%- END %] |
|
24 |
<th>[%- LxERP.t8('Notes') %]</th> |
|
25 |
</tr> |
|
26 |
|
|
27 |
[%- FOREACH row = SELF.data %] |
|
28 |
[%- IF (SELF.profile.get('full_preview') == 2) || ((SELF.profile.get('full_preview') == 1) && (row.errors.size || row.information.size)) || ((SELF.profile.get('full_preview') == 0) && (loop.count < 21)) %] |
|
29 |
<tr class="[% IF row.errors.size %]redrow[% ELSE %]listrow[% END %][% loop.count % 2 %]"> |
|
30 |
[%- FOREACH method = SELF.info_headers.methods %] |
|
31 |
<td>[%- HTML.escape(row.info_data.$method) %]</td> |
|
32 |
[%- END %] |
|
33 |
[%- FOREACH method = SELF.headers.methods %] |
|
34 |
<td>[%- HTML.escape(row.object.$method) %]</td> |
|
35 |
[%- END %] |
|
36 |
[%- FOREACH method = SELF.raw_data_headers.headers %] |
|
37 |
<td>[%- HTML.escape(row.raw_data.$method) %]</td> |
|
38 |
[%- END %] |
|
39 |
<td> |
|
40 |
[%- FOREACH error = row.errors %][%- HTML.escape(error) %][% UNLESS loop.last %]<br>[%- END %][%- END %] |
|
41 |
[%- FOREACH info = row.information %][% IF !loop.first || row.errors.size %]<br>[%- END %][%- HTML.escape(info) %][%- END %] |
|
42 |
</td> |
|
43 |
</tr> |
|
44 |
[%- END %] |
|
45 |
[%- END %] |
|
46 |
|
|
47 |
</table> |
|
48 |
[%- END %] |
templates/webpages/csv_import/_result.html | ||
---|---|---|
1 |
[% USE LxERP %] |
|
2 |
|
|
3 |
<h3>[%- LxERP.t8('Import summary') %]</h3> |
|
4 |
|
|
5 |
[%- IF SELF.import_status == 'imported' %] |
|
6 |
<p>[%- LxERP.t8('#1 of #2 importable objects were imported.', SELF.num_imported, SELF.num_importable || 0) %]</p> |
|
7 |
[%- ELSE %] |
|
8 |
<p>[%- LxERP.t8('Found #1 objects of which #2 can be imported.', SELF.data.size || 0, SELF.num_importable || 0) %]</p> |
|
9 |
[%- END %] |
templates/webpages/csv_import/_results.html | ||
---|---|---|
1 |
[%- IF SELF.errors %] |
|
2 |
[%- PROCESS 'csv_import/_errors.html' %] |
|
3 |
[%- END %] |
|
4 |
|
|
5 |
[%- PROCESS 'csv_import/_result.html' %] |
|
6 |
[%- PROCESS 'csv_import/_preview.html' %] |
|
7 |
|
|
8 |
[% IF progress == 100 %] |
|
9 |
<script type='text/javascript'> |
|
10 |
$(function(){ $('#action_import').show() }) |
|
11 |
</script> |
|
12 |
[% END %] |
templates/webpages/csv_import/form.html | ||
---|---|---|
338 | 338 |
<div id='results'> |
339 | 339 |
[%- IF SELF.deferred %] |
340 | 340 |
[%- PROCESS 'csv_import/_deferred_results.html' %] |
341 |
[%- ELSIF SELF.import_status %] |
|
342 |
[%- PROCESS 'csv_import/_results.html' %] |
|
343 | 341 |
[%- END %] |
344 | 342 |
</div> |
345 | 343 |
|
Auch abrufbar als: Unified diff
CsvImport: nicht mehr benutzte Templates des synchronen Csv-Imports entfernen.