Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 65a06b57

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

  • ID 65a06b5759756e48e5cf30bd36ffcf9ea4b27522
  • Vorgänger 2e3bdf1a
  • Nachfolger fbcd5580

CSV-Import: Kommentare zu Formular hinzugefügt

Unterschiede anzeigen:

templates/webpages/csv_import/form.html
14 14
 [%- IF SELF.profile.get('dont_edit_profile') %]
15 15
  [% L.hidden_tag('force_profile', 1) %]
16 16
  [% L.hidden_tag('profile.id', SELF.profile.id) %]
17
 [%- ELSE %]
17
 [%- ELSE %][%# IF SELF.profile.get('dont_edit_profile') %]
18 18
  <h2>[%- LxERP.t8('Import profiles') %]</h2>
19 19

  
20 20
  <table>
......
23 23
     <th align="right">[%- LxERP.t8('Current profile') %]:</th>
24 24
     <td>[%- HTML.escape(SELF.profile.name) %]</td>
25 25
    </tr>
26
   [%- END %]
26
   [%- END %][%# IF SELF.profile.id %]
27 27

  
28 28
   [%- IF SELF.all_profiles.size %]
29 29
    <tr>
......
36 36
      [% L.submit_tag('action_destroy', LxERP.t8('Delete profile'), confirm => LxERP.t8('Do you really want to delete this object?')) %]
37 37
     </td>
38 38
    </tr>
39
   [%- END %]
39
   [%- END %][%# IF SELF.all_profiles.size %]
40 40

  
41 41
   <tr>
42 42
    <th align="right" valign="top">[%- LxERP.t8('Save settings as') %]:</th>
......
65 65
       <tr class="listheading">
66 66
         [%- FOREACH p = SELF.worker.profile %]
67 67
           <th>[%- p.row_ident %]</th>
68
         [%- END %]
68
         [%- END %][%# FOREACH SELF.worker.profile %]
69 69
       </tr>
70 70
       <tr class="listrow[% loop.count % 2 %]">
71 71
         [%- FOREACH p = SELF.worker.profile %]
......
82 82
               <td>[%- HTML.escape(row.name) %]</td>
83 83
               <td>[%- HTML.escape(row.description) %]</td>
84 84
             </tr>
85
             [%- END %]
85
             [%- END %][%# FOREACH SELF.displayable_columns.$ri %]
86 86
           </table>
87 87
         </td>
88
         [%- END %]
88
         [%- END %][%# FOREACH SELF.worker.profile %]
89 89
       </tr>
90 90
     </table>
91
   [%- ELSE %]
91
   [%- ELSE %][%# IF SELF.worker.is_multiplexed %]
92 92
     <table>
93 93
       <tr class="listheading">
94 94
         <th>[%- LxERP.t8('Column name') %]</th>
......
100 100
         <td>[%- HTML.escape(row.name) %]</td>
101 101
         <td>[%- HTML.escape(row.description) %]</td>
102 102
       </tr>
103
       [%- END %]
103
       [%- END %][%# FOREACH SELF.displayable_columns %]
104 104
     </table>
105
   [%- END %]
105
   [%- END %][%# SELF.worker.is_multiplexed %]
106 106

  
107 107
[%- IF SELF.type == 'contacts' %]
108 108
   <p>
......
150 150
    [%- LxERP.t8('Amount and net amount are calculated by kivitendo. "verify_amount" and "verify_netamount" can be used for sanity checks.') %]<br>
151 151
    [%- LxERP.t8('If amounts differ more than "Maximal amount difference" (see settings), this item is marked as invalid.') %]<br>
152 152
   </p>
153
[%- END %]
153
[%- END %][%# IF SELF.type == … %]
154 154

  
155 155
   <p>
156 156
    [%- L.submit_tag('action_download_sample', LxERP.t8('Download sample file')) %]
......
190 190
      [% IF SELF.sep_char == entry.first %] [% SET custom_sep_char = '' %] [%- END %]
191 191
      [% L.radio_button_tag('sep_char', value => entry.first, label => entry.last, checked => SELF.sep_char == entry.first) %]
192 192
     </td>
193
    [%- END %]
193
    [%- END %][%# FOREACH SELF.all_sep_chars %]
194 194

  
195 195
    <td>
196 196
     [% L.radio_button_tag('sep_char', value => 'custom', checked => custom_sep_char != '') %]
......
206 206
      [% IF SELF.quote_char == entry.first %] [% SET custom_quote_char = '' %] [%- END %]
207 207
      [% L.radio_button_tag('quote_char', value => entry.first, label => entry.last, checked => SELF.quote_char == entry.first) %]
208 208
     </td>
209
    [%- END %]
209
    [%- END %][%# FOREACH SELF.all_quote_chars %]
210 210

  
211 211
    <td>
212 212
     [% L.radio_button_tag('quote_char', value => 'custom', checked => custom_quote_char != '') %]
......
222 222
      [% IF SELF.escape_char == entry.first %] [% SET custom_escape_char = '' %] [%- END %]
223 223
      [% L.radio_button_tag('escape_char', value => entry.first, label => entry.last, checked => SELF.escape_char == entry.first) %]
224 224
     </td>
225
    [%- END %]
225
    [%- END %][%# FOREACH SELF.all_escape_chars %]
226 226

  
227 227
    <td>
228 228
     [% L.radio_button_tag('escape_char', value => 'custom', checked => custom_escape_char != '') %]
......
239 239
         [% FOREACH key = duplicate_fields.keys %]
240 240
           <input type="checkbox" name="settings.duplicates_[% key | html %]" id="settings.duplicates_[% key | html %]" value="1"[% IF ( SELF.profile.get('duplicates_'_ key) || (duplicate_fields.$key.default && !FORM.form_sent ) ) %] checked="checked"[% END %]>
241 241
           <label for="settings.duplicates_[% key | html %]">[% duplicate_fields.$key.label | html %]</label>
242
         [% END %]
242
         [% END %][%# FOREACH duplicate_fields.keys %]
243 243
       </td>
244 244
     </tr>
245 245

  
......
253 253
         [% L.select_tag('settings.duplicates', opts, default = SELF.profile.get('duplicates'), style = 'width: 300px') %]
254 254
       </td>
255 255
     </tr>
256
   [% END %]
256
   [% END %][%# IF duplicate_fields.size %]
257 257

  
258 258
[%- IF SELF.type == 'parts' %]
259 259
 [%- INCLUDE 'csv_import/_form_parts.html' %]
......
290 290
     <th align="right">[%- LxERP.t8('Existing file on server') %]:</th>
291 291
     <td colspan="10">[%- LxERP.t8('Uploaded on #1, size #2 kB', SELF.file.displayable_mtime, LxERP.format_amount(SELF.file.size / 1024, 2)) %]</td>
292 292
    </tr>
293
   [%- END %]
293
   [%- END %][%# IF SELF.file.exists %]
294 294

  
295 295
  </table>
296 296

  
......
319 319
   </tr>
320 320
[%- FOREACH row = SELF.mappings %]
321 321
   [% PROCESS 'csv_import/_mapping_item.html', item=row IF row.from %]
322
[%- END %]
322
[%- END %][%# FOREACH SELF.mappings %]
323 323
   [% PROCESS 'csv_import/_mapping_item.html', item={} %]
324 324
  </table>
325 325

  
......
328 328

  
329 329
  </div>
330 330
  <hr>
331
[%- END %]
331
[%- END %][%# UNLESS SELF.worker.is_multiplexed %]
332 332
  [% L.submit_tag('action_test', LxERP.t8('Test and preview')) %]
333
[%- END %]
333
[%- END %][%# IF SELF.profile.get('dont_edit_profile') %]
334 334
  [% L.submit_tag('action_import', LxERP.t8('Import'), style='display:none') %]
335 335

  
336 336
 </form>
......
338 338
 <div id='results'>
339 339
 [%- IF SELF.deferred %]
340 340
   [%- PROCESS 'csv_import/_deferred_results.html' %]
341
 [%- END %]
341
 [%- END %][%# IF SELF.deferred %]
342 342
 </div>
343 343

  
344 344

  

Auch abrufbar als: Unified diff