Revision f9bdde1a
Von Cem Aydin vor fast 2 Jahren hinzugefügt
templates/design40_webpages/csv_import/_form_banktransactions.html | ||
---|---|---|
1 | 1 |
[% USE LxERP %] |
2 | 2 |
[% USE L %] |
3 |
|
|
3 | 4 |
<tr> |
4 |
<th>[% LxERP.t8("Existing bank transactions") %]:</th> |
|
5 |
<td> |
|
6 |
[% opts = [ [ 'skip', LxERP.t8('Skip entry') ] , [ 'insert_new', LxERP.t8('Insert new') ] ] %] |
|
7 |
[% L.select_tag('settings.update_policy', opts, default = SELF.profile.get('update_policy'), class='wi-normal') %] |
|
8 |
</td> |
|
9 |
</tr> |
|
5 |
<th>[% LxERP.t8("Existing bank transactions") %]:</th> |
|
6 |
<td> |
|
7 |
[% opts = [ |
|
8 |
[ 'skip', LxERP.t8('Skip entry') ], |
|
9 |
[ 'insert_new', LxERP.t8('Insert new') ] ] %] |
|
10 |
[% L.select_tag('settings.update_policy', opts, |
|
11 |
default = SELF.profile.get('update_policy'), class='wi-normal') %] |
|
12 |
</td> |
|
13 |
</tr> |
templates/design40_webpages/csv_import/_form_customers_vendors.html | ||
---|---|---|
2 | 2 |
[% USE L %] |
3 | 3 |
|
4 | 4 |
<tr> |
5 |
<th>[%- LxERP.t8('Target table') %]:</th> |
|
6 |
<td> |
|
7 |
[% opts = [ [ 'customer', LxERP.t8('Customers') ], [ 'vendor', LxERP.t8('Vendors') ] ] %] |
|
8 |
[% L.select_tag('settings.table', opts, default = SELF.profile.get('table'), style = 'width: 300px') %] |
|
9 |
</td> |
|
5 |
<th>[% LxERP.t8('Target table') %]:</th> |
|
6 |
<td> |
|
7 |
[% opts = [ |
|
8 |
[ 'customer', LxERP.t8('Customers') ], |
|
9 |
[ 'vendor', LxERP.t8('Vendors') ] ] %] |
|
10 |
[% L.select_tag('settings.table', opts, default = SELF.profile.get('table'), |
|
11 |
class='wi-wide') %] |
|
12 |
</td> |
|
10 | 13 |
</tr> |
11 |
|
|
12 | 14 |
<tr> |
13 |
<th>[%- LxERP.t8('Existing customers/vendors with same customer/vendor number') %]:</th> |
|
14 |
<td> |
|
15 |
[% opts = [ [ 'update_existing', LxERP.t8('Update properties of existing entries') ], [ 'insert_new', LxERP.t8('Insert with new customer/vendor number') ], [ 'skip', LxERP.t8('Skip entry') ] ] %] |
|
16 |
[% L.select_tag('settings.update_policy', opts, default = SELF.profile.get('update_policy'), style = 'width: 300px') %] |
|
17 |
</td> |
|
15 |
<th>[% LxERP.t8('Existing customers/vendors with same customer/vendor number') %]:</th> |
|
16 |
<td> |
|
17 |
[% opts = [ |
|
18 |
[ 'update_existing', LxERP.t8('Update properties of existing entries') ], |
|
19 |
[ 'insert_new', LxERP.t8('Insert with new customer/vendor number') ], |
|
20 |
[ 'skip', LxERP.t8('Skip entry') ] ] %] |
|
21 |
[% L.select_tag('settings.update_policy', opts, |
|
22 |
default = SELF.profile.get('update_policy'), class='wi-wide') %] |
|
23 |
</td> |
|
18 | 24 |
</tr> |
19 |
|
|
20 | 25 |
<tr> |
21 |
<th>[%- LxERP.t8('Default taxzone') %]:</th> |
|
22 |
<td> |
|
23 |
[% L.select_tag('settings.default_taxzone', SELF.all_taxzones, default = SELF.profile.get('default_taxzone'), title_key = 'description', style => 'width: 300px') %] |
|
24 |
</td> |
|
25 |
</tr> |
|
26 |
|
|
26 |
<th>[% LxERP.t8('Default taxzone') %]:</th> |
|
27 |
<td> |
|
28 |
[% L.select_tag('settings.default_taxzone', SELF.all_taxzones, |
|
29 |
default = SELF.profile.get('default_taxzone'), |
|
30 |
title_key = 'description', class='wi-wide') %] |
|
31 |
</td> |
|
32 |
</tr> |
templates/design40_webpages/csv_import/form.html | ||
---|---|---|
35 | 35 |
<tr> |
36 | 36 |
<th>[% LxERP.t8('Existing profiles') %]:</th> |
37 | 37 |
<td> |
38 |
[% L.select_tag('profile.id', SELF.all_profiles, title_key = 'name', default = SELF.profile.id, style = 'width: 300px') %] <br> |
|
39 |
[% L.submit_tag('action_new', LxERP.t8('Load profile')) %] |
|
40 |
[% L.submit_tag('action_destroy', LxERP.t8('Delete profile'), confirm => LxERP.t8('Do you really want to delete this object?')) %] |
|
38 |
[% L.select_tag('profile.id', SELF.all_profiles, title_key = 'name', default = SELF.profile.id, class='wi-wide') %] |
|
39 |
<div class="buttons below"> |
|
40 |
[% L.submit_tag('action_new', LxERP.t8('Load profile')) %] |
|
41 |
[% L.submit_tag('action_destroy', LxERP.t8('Delete profile'), confirm => LxERP.t8('Do you really want to delete this object?')) %] |
|
42 |
</div> |
|
41 | 43 |
</td> |
42 | 44 |
</tr> |
43 | 45 |
[% END %] |
44 | 46 |
<tr> |
45 | 47 |
<th>[% LxERP.t8('Save settings as') %]:</th> |
46 | 48 |
<td> |
47 |
[% L.input_tag('profile.name', '', style => 'width: 300px') %]<br> |
|
48 |
[% L.checkbox_tag('profile.is_default', label => LxERP.t8('Make default profile')) %]<br> |
|
49 |
<div class="buttons below">[% L.submit_tag('action_save', LxERP.t8('Save profile'), class='below') %]</div> |
|
49 |
[% L.input_tag('profile.name', '', class='wi-wide') %] |
|
50 |
<div class="below"> |
|
51 |
[% L.checkbox_tag('profile.is_default', label => LxERP.t8('Make default profile'), class='below') %] |
|
52 |
</div> |
|
53 |
<div class="buttons below"> |
|
54 |
[% L.submit_tag('action_save', LxERP.t8('Save profile')) %] |
|
55 |
</div> |
|
50 | 56 |
</td> |
51 | 57 |
</tr> |
52 | 58 |
</tbody> |
... | ... | |
79 | 85 |
<tr> |
80 | 86 |
<th>[% LxERP.t8('Separator') %]:</th> |
81 | 87 |
<td> |
82 |
[% SET custom_sep_char = SELF.sep_char %] |
|
83 |
[% FOREACH entry = SELF.all_sep_chars %] |
|
84 |
[% IF SELF.sep_char == entry.first %] [% SET custom_sep_char = '' %] [% END %] |
|
85 |
[% L.radio_button_tag('sep_char', value => entry.first, label => entry.last, checked => SELF.sep_char == entry.first) %]<br> |
|
86 |
[% END %] |
|
87 |
[% L.radio_button_tag('sep_char', value => 'custom', checked => custom_sep_char != '') %] |
|
88 |
[% L.input_tag('custom_sep_char', custom_sep_char, size => 3, maxlength => 1) %] |
|
88 |
[% SET custom_sep_char = SELF.sep_char %]
|
|
89 |
[% FOREACH entry = SELF.all_sep_chars %]
|
|
90 |
[% IF SELF.sep_char == entry.first %] [% SET custom_sep_char = '' %] [% END %]
|
|
91 |
[% L.radio_button_tag('sep_char', value => entry.first, label => entry.last, checked => SELF.sep_char == entry.first) %]<br>
|
|
92 |
[% END %]
|
|
93 |
[% L.radio_button_tag('sep_char', value => 'custom', checked => custom_sep_char != '') %]
|
|
94 |
[% L.input_tag('custom_sep_char', custom_sep_char, size => 3, maxlength => 1) %]
|
|
89 | 95 |
</td> |
90 | 96 |
</tr> |
91 | 97 |
<tr> |
... | ... | |
132 | 138 |
[% opts = [ [ 'no_check', LxERP.t8('Do not check for duplicates') ], |
133 | 139 |
[ 'check_csv', LxERP.t8('Discard duplicate entries in CSV file') ], |
134 | 140 |
[ 'check_db', LxERP.t8('Discard entries with duplicates in database or CSV file') ] ] %] |
135 |
[% L.select_tag('settings.duplicates', opts, default = SELF.profile.get('duplicates'), style = 'width: 300px') %]
|
|
141 |
[% L.select_tag('settings.duplicates', opts, default = SELF.profile.get('duplicates'), class='wi-wide') %]
|
|
136 | 142 |
</td> |
137 | 143 |
</tr> |
138 | 144 |
[% END %] |
... | ... | |
365 | 371 |
|
366 | 372 |
|
367 | 373 |
<script type="text/javascript"> |
368 |
<!-- |
|
369 |
$(document).ready(function() { |
|
370 |
$('#action_save').click(function() { |
|
371 |
if ($('#profile_name').val() != '') |
|
372 |
return true; |
|
373 |
alert('[% LxERP.t8('Please enter a profile name.') %]'); |
|
374 |
return false; |
|
375 |
}); |
|
376 |
$('#add_empty_mapping_line').click(function(){ |
|
377 |
$.get('controller.pl', { action: 'CsvImport/add_empty_mapping_line', 'profile.type': $('#profile_type').val() }, kivi.eval_json_result); |
|
378 |
}); |
|
379 |
$('#add_mapping_from_upload').click(function(){ |
|
380 |
$.get('controller.pl?action_add_mapping_from_upload=1', $('form').serialize() , kivi.eval_json_result); |
|
381 |
}); |
|
382 |
$('#csv_import_mappings').on('click', '.remove_line', function(){ $(this).closest('tr').remove(); if (1==$('#csv_import_mappings tr:visible').length) $('#mapping_empty').show() }); |
|
374 |
$(document).ready(function() { |
|
375 |
$('#action_save').click(function() { |
|
376 |
if ($('#profile_name').val() != '') |
|
377 |
return true; |
|
378 |
alert('[% LxERP.t8('Please enter a profile name.') %]'); |
|
379 |
return false; |
|
380 |
}); |
|
381 |
$('#add_empty_mapping_line').click(function(){ |
|
382 |
$.get('controller.pl', { action: 'CsvImport/add_empty_mapping_line', 'profile.type': $('#profile_type').val() }, kivi.eval_json_result); |
|
383 |
}); |
|
384 |
$('#add_mapping_from_upload').click(function(){ |
|
385 |
$.get('controller.pl?action_add_mapping_from_upload=1', $('form').serialize() , kivi.eval_json_result); |
|
383 | 386 |
}); |
384 |
--> |
|
387 |
$('#csv_import_mappings').on('click', '.remove_line', function(){ $(this).closest('tr').remove(); if (1==$('#csv_import_mappings tr:visible').length) $('#mapping_empty').show() }); |
|
388 |
}); |
|
385 | 389 |
</script> |
templates/design40_webpages/csv_import/report.html | ||
---|---|---|
1 | 1 |
[% USE HTML %] |
2 | 2 |
[% USE LxERP %] |
3 | 3 |
[% USE L %] |
4 |
<h2> |
|
5 |
[% IF SELF.report.test_mode %] |
|
6 |
[% LxERP.t8('Import preview') %] |
|
7 |
[% ELSE %] |
|
8 |
[% LxERP.t8('Import result') %] |
|
9 |
[% END %] |
|
10 |
[% IF SELF.num_errors %] |
|
11 |
<font color="red">([%- SELF.num_errors -%] [%- LxERP.t8('Errors') -%])</font> |
|
12 |
[% END %] |
|
4 |
|
|
5 |
<h2> |
|
6 |
[% IF SELF.report.test_mode %] |
|
7 |
[% LxERP.t8('Import preview') %] |
|
8 |
[% ELSE %] |
|
9 |
[% LxERP.t8('Import result') %] |
|
10 |
[% END %] |
|
11 |
[% IF SELF.num_errors %] |
|
12 |
<font color="red">([%- SELF.num_errors -%] [%- LxERP.t8('Errors') -%])</font> |
|
13 |
[% END %] |
|
13 | 14 |
</h2> |
14 | 15 |
|
15 | 16 |
[% IF SELF.report.test_mode %] |
16 |
<p> |
|
17 |
[% LxERP.t8("The following is only a preview.") %] |
|
18 |
[% LxERP.t8("No entries have been imported yet.") %] |
|
19 |
</p> |
|
17 |
<p>
|
|
18 |
[% LxERP.t8("The following is only a preview.") %]
|
|
19 |
[% LxERP.t8("No entries have been imported yet.") %]
|
|
20 |
</p>
|
|
20 | 21 |
[% END %] |
21 | 22 |
|
22 | 23 |
[% PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %] |
23 |
<table class="tbl-list"> |
|
24 | 24 |
|
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 %] |
|
29 |
[% END %] |
|
25 |
<table class="tbl-list"> |
|
30 | 26 |
|
31 |
<thead> |
|
32 |
[% FOREACH rownum = SELF.display_rows %] |
|
33 |
[% SET to_pad = max_col - SELF.report_rows.${rownum}.size %] |
|
34 |
[% IF rownum < SELF.report_numheaders %] |
|
35 |
<tr> |
|
36 |
[% FOREACH value = SELF.report_rows.${rownum} %] |
|
37 |
<th>[% value | html %]</th> |
|
27 |
[% SET max_col = 0 %] |
|
28 |
[% FOREACH rownum = SELF.display_rows %] |
|
29 |
[% SET max_col = max_col > SELF.report_rows.${rownum}.size ? max_col : SELF.report_rows.${rownum}.size %] |
|
30 |
[% LAST IF rownum >= SELF.report_numheaders %] |
|
38 | 31 |
[% END %] |
39 |
[% IF to_pad %]<th style="text-align:center" colspan="[% to_pad %]">-</th>[% END %] |
|
40 |
<th>[% LxERP.t8('Notes') %]</th> |
|
41 |
</tr> |
|
42 |
[% END %] |
|
43 |
[% END %] |
|
44 |
</thead> |
|
45 |
<tbody> |
|
46 |
[% FOREACH rownum = SELF.display_rows %] |
|
47 |
[% SET to_pad = max_col - SELF.report_rows.${rownum}.size %] |
|
48 |
[% IF rownum > SELF.report_numheaders %] |
|
49 |
[% csv_import_report_errors = SELF.report_status.${rownum}.errors %] |
|
50 |
<tr class="listrow[% IF csv_import_report_errors && csv_import_report_errors.size %]_error[% END %][% (loop.count + SELF.report_numheaders) % 2 %]"> |
|
51 |
[% FOREACH value = SELF.report_rows.${rownum} %] |
|
52 |
<td>[% value | html %]</td> |
|
53 |
[% END %] |
|
54 |
[% IF to_pad %]<td colspan="[% to_pad %]">-</td>[% END %] |
|
55 |
<td> |
|
56 |
[% FOREACH error = csv_import_report_errors %][% error | html %][% UNLESS loop.last %]<br>[% END %][% END %] |
|
57 |
[% FOREACH info = SELF.report_status.${rownum}.information %][% IF rownum >= SELF.report_numheaders || csv_import_report_errors.size %]<br>[% END %][% info | html %][% END %] |
|
58 |
</td> |
|
59 |
</tr> |
|
60 |
[% END %] |
|
61 |
[% END %] |
|
62 |
</tbody> |
|
32 |
|
|
33 |
<thead> |
|
34 |
[% FOREACH rownum = SELF.display_rows %] |
|
35 |
[% SET to_pad = max_col - SELF.report_rows.${rownum}.size %] |
|
36 |
[% IF rownum < SELF.report_numheaders %] |
|
37 |
<tr> |
|
38 |
[% FOREACH value = SELF.report_rows.${rownum} %] |
|
39 |
<th>[% value | html %]</th> |
|
40 |
[% END %] |
|
41 |
[% IF to_pad %]<th style="text-align:center" colspan="[% to_pad %]">-</th>[% END %] |
|
42 |
<th>[% LxERP.t8('Notes') %]</th> |
|
43 |
</tr> |
|
44 |
[% END %] |
|
45 |
[% END %] |
|
46 |
</thead> |
|
47 |
<tbody> |
|
48 |
[% FOREACH rownum = SELF.display_rows %] |
|
49 |
[% SET to_pad = max_col - SELF.report_rows.${rownum}.size %] |
|
50 |
[% IF rownum > SELF.report_numheaders %] |
|
51 |
[% csv_import_report_errors = SELF.report_status.${rownum}.errors %] |
|
52 |
<tr class="listrow[% IF csv_import_report_errors && csv_import_report_errors.size %]_error[% END %][% (loop.count + SELF.report_numheaders) % 2 %]"> |
|
53 |
[% FOREACH value = SELF.report_rows.${rownum} %] |
|
54 |
<td>[% value | html %]</td> |
|
55 |
[% END %] |
|
56 |
[% IF to_pad %]<td colspan="[% to_pad %]">-</td>[% END %] |
|
57 |
<td> |
|
58 |
[% FOREACH error = csv_import_report_errors %][% error | html %][% UNLESS loop.last %]<br>[% END %][% END %] |
|
59 |
[% FOREACH info = SELF.report_status.${rownum}.information %][% IF rownum >= SELF.report_numheaders || csv_import_report_errors.size %]<br>[% END %][% info | html %][% END %] |
|
60 |
</td> |
|
61 |
</tr> |
|
62 |
[% END %] |
|
63 |
[% END %] |
|
64 |
</tbody> |
|
63 | 65 |
|
64 | 66 |
</table> |
65 | 67 |
|
Auch abrufbar als: Unified diff
design40: Templates zum CSV Import vereinheitlicht
- Einrückung angepasst
- inline Styles durch Klassen ersetzt
- form.html: div und Klassen für Buttons hinzugefügt, HTML Kommentare aus script tags entfernt