Revision db8c4e18
Von Sven Schöling vor etwa 1 Jahr hinzugefügt
templates/webpages/price_rule/item.html | ||
---|---|---|
17 | 17 |
<a class='price_rule_remove_line interact cursor-pointer'>✘</a> |
18 | 18 |
[% L.hidden_tag('price_rule.items[+].id', item.id) %] |
19 | 19 |
[% L.hidden_tag('price_rule.items[].type', item.type) %] |
20 |
[% L.hidden_tag('price_rule.items[].custom_variable_configs_id', item.custom_variable_configs_id) %] |
|
20 | 21 |
[%- SWITCH item.type %] |
21 | 22 |
[% CASE 'part' %] |
22 | 23 |
[% 'Part' | $T8 %] [% 'is' | $T8 %] [% P.part.picker('price_rule.items[].value_int', item.part) %] |
... | ... | |
37 | 38 |
[% CASE 'pricegroup' %] |
38 | 39 |
[% 'Pricegroup' | $T8 %] [% 'is' | $T8 %] [% L.select_tag('price_rule.items[].value_int', SELF.pricegroups, title_key='pricegroup', default=item.value_int) %] |
39 | 40 |
[% CASE 'cvar' %] |
40 |
[% # Dumper.dump_html(SELF.cvar.processed_options) %] |
|
41 |
[% 'Custom Variables' | $T8 %] [% 'is' | $T8 %] [% L.select_tag('price_rule.items[].custom_variable_configs_id', SELF.cvar, title_key='description', default=item.custom_variable_configs_id ) %] [% 'with value' | $T8 %] [% L.select_tag('price_rule.items[].value_text', SELF.cvar.processed_options, title_key='options', default=item.value_text ) %] |
|
42 |
|
|
41 |
[% # Dumper.dump_html(SELF.cvar.processed_options) %] |
|
42 |
[% SET cvar_config = item.cvar_config %] |
|
43 |
[% SET description = cvar_config.description %] |
|
44 |
[% SWITCH cvar_config.type %] |
|
45 |
[% CASE 'timestamp' %] |
|
46 |
[% description | html %] [% L.select_tag('price_rule.items[].op', date_compare_ops, default=item.op) %] [% L.date_tag('price_rule.items[].value_date', item.value_date) %] |
|
47 |
[% CASE 'date' %] |
|
48 |
[% description | html %] [% L.select_tag('price_rule.items[].op', date_compare_ops, default=item.op) %] [% L.date_tag('price_rule.items[].value_date', item.value_date) %] |
|
49 |
[% CASE 'number' %] |
|
50 |
[% description | html %] [% L.select_tag('price_rule.items[].op', num_compare_ops, default=item.op) %] [% L.input_tag('price_rule.items[].value_num_as_number', item.value_num_as_number) %] |
|
51 |
[% CASE 'integer' %] |
|
52 |
[% description | html %] [% L.select_tag('price_rule.items[].op', num_compare_ops, default=item.op) %] [% L.input_tag('price_rule.items[].value_num_as_number', item.value_num_as_number) %] |
|
53 |
[% CASE 'customer' %] |
|
54 |
[% description | html %] [% 'is' | $T8 %] [% P.customer_vendor.picker('price_rule.items[].value_int', item.customer, type='customer') %] |
|
55 |
[% CASE 'vendor' %] |
|
56 |
[% description | html %] [% 'is' | $T8 %] [% P.customer_vendor.picker('price_rule.items[].value_int', item.vendor, type='vendor') %] |
|
57 |
[% CASE 'part' %] |
|
58 |
[% description | html %] [% 'is' | $T8 %] [% P.part.picker('price_rule.items[].value_int', item.part) %] |
|
59 |
[% CASE 'select' %] |
|
60 |
[% description | html %] [% 'is' | $T8 %] [% L.select_tag('price_rule.items[].value_text', cvar_config.processed_options, title_key='options', default=item.value_text ) %] |
|
61 |
[% END %] |
|
43 | 62 |
[% CASE %] |
44 | 63 |
[%- END %] |
45 | 64 |
</div> |
Auch abrufbar als: Unified diff
CVar + PriceRule: anlegen/editieren/speichern im Preisregel Controller
Im Moment erlaubt sind alle CVar configs, die:
- irgendwie im Beleg erreichbar sind (alle module ausser Pflichtenhefte)
- und von einem Typ sind die mit dem bestehenden Preisregelsystem
abgebildet werden können. d.h.: