5 [%- IF SELF.report.test_mode %]
6 [%- LxERP.t8('Import preview') %]
8 [%- LxERP.t8('Import result') %]
12 [%- IF SELF.report.test_mode %]
14 [% LxERP.t8("The following is only a preview.") %]
15 [% LxERP.t8("No entries have been imported yet.") %]
19 [%- PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %]
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 %]
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} %]
33 <th>[% value | html %]</th>
35 [%- IF to_pad -%]<th style="text-align:center" colspan="[%- to_pad -%]">-</th>[%- END -%]
36 <th>[%- LxERP.t8('Notes') %]</th>
39 [% csv_import_report_errors = SELF.report_status.${rownum}.errors %]
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>
44 [%- IF to_pad -%]<td align="center" colspan="[%- to_pad -%]">-</td>[%- 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 %]
55 [%- PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %]
57 <script type='text/javascript'>
58 $(function(){ [%- IF SELF.reporterror %] kivi.clear_flash('info',0);kivi.display_flash('error','[% SELF.reporterror %]',0); [%- ELSE %][%- IF SELF.report.test_mode %] $('#action_import').show() [%- END %][%- END %] });