5 [%- IF SELF.report.test_mode %]
6 [%- LxERP.t8('Import preview') %]
8 [%- LxERP.t8('Import result') %]
10 [%- IF SELF.num_errors -%]
11 <font color="red">([%- SELF.num_errors -%] [%- LxERP.t8('Errors') -%])</font>
15 [%- IF SELF.report.test_mode %]
17 [% LxERP.t8("The following is only a preview.") %]
18 [% LxERP.t8("No entries have been imported yet.") %]
22 [%- PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %]
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 %]
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} %]
36 <th>[% value | html %]</th>
38 [%- IF to_pad -%]<th style="text-align:center" colspan="[%- to_pad -%]">-</th>[%- END -%]
39 <th>[%- LxERP.t8('Notes') %]</th>
42 [% csv_import_report_errors = SELF.report_status.${rownum}.errors %]
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>
47 [%- IF to_pad -%]<td align="center" colspan="[%- to_pad -%]">-</td>[%- 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 %]
58 [%- PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %]
60 <script type='text/javascript'>
62 [%- IF SELF.reporterror %]
63 kivi.clear_flash('info',0);
64 kivi.display_flash('error','[% SELF.reporterror %]',0);
65 [%- ELSIF SELF.report.test_mode %]
66 kivi.ActionBar.Action('#action_import').enable();