08997b9453290153652f72e65f2399eabc0f6708
[kivitendo-erp.git] / 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.headers.headers %]
16     <th>[%- HTML.escape(column) %]</th>
17    [%- END %]
18    [%- FOREACH column = SELF.raw_data_headers.headers %]
19     <th>[%- HTML.escape(column) %]</th>
20    [%- END %]
21    <th>[%- LxERP.t8('Notes') %]</th>
22   </tr>
23
24   [%- FOREACH row = SELF.data %]
25   <tr class="[% IF row.errors.size %]redrow[% ELSE %]listrow[% END %][% loop.count % 2 %]">
26    [%- FOREACH method = SELF.headers.methods %]
27     <td>[%- HTML.escape(row.object.$method) %]</td>
28    [%- END %]
29    [%- FOREACH method = SELF.raw_data_headers.headers %]
30     <td>[%- HTML.escape(row.raw_data.$method) %]</td>
31    [%- END %]
32    <td>
33     [%- FOREACH error = row.errors %][%- HTML.escape(error) %][% UNLESS loop.last %]<br>[%- END %][%- END %]
34    </td>
35   </tr>
36   [%- END %]
37
38  </table>
39 [%- END %]