Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b16967fa

Von Tamino Steinert vor 11 Monaten hinzugefügt

  • ID b16967fa366133acb08f22f189f16471f75772b5
  • Vorgänger 66c06a13
  • Nachfolger c25824ca

Varianten: Varianten Eigenschaften Tab für Varianten

Unterschiede anzeigen:

SL/DB/Part.pm
98 98
    map_to    => 'variant_property',
99 99
    type      => 'many to many',
100 100
  },
101
  variant_porperty_values => {
101
  variant_property_values => {
102 102
    map_class => 'SL::DB::VariantPropertyValuePart',
103 103
    map_from  => 'part',
104 104
    map_to    => 'variant_property_value',
templates/design40_webpages/part/_parent_variant.html
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE LxERP %]
4
[% USE L %]
5
[% USE P %]
6

  
7
<div class="wrapper input-panel">
8
  <h3> [% LxERP.t8("Create new Variants") %] </h3>
9
  <div class="wrapper">
10
  [% FOREACH variant_property = SELF.part.variant_properties %]
11
    <div class="col input-panel" style="min-width:fit-content;">
12
      <h4>[% variant_property.name_translated | html %]</h4>
13
      [% L.select_tag("variant_properties." _ variant_property.id _ ".selected_property_values[]",
14
        variant_property.property_values,
15
        title_key='value_translated', value_key='id',
16
        id="selected_property_values_" _ variant_property.id,
17
        multiple=1,
18
      ) %]
19
      [% L.multiselect2side(
20
        "selected_property_values_" _ variant_property.id,
21
        labelsx=LxERP.t8("All Property Values"),
22
        labeldx=LxERP.t8("Selected Property Values")
23
      ) %]
24
    </div>
25
  [% END %]
26
  </div>
27
  [% L.button_tag('kivi.Part.create_variants();', LxERP.t8("Create Variants with selected Values")) %]
28
</div>
29

  
30
<br>
31

  
32
variants:
33
[% FOREACH variant = SELF.part.variants %]
34
  [% variant.partnumber %]:[% variant.description %]
35
[% END %]
36

  
37

  
templates/design40_webpages/part/_variant.html
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE LxERP %]
4
[% USE L %]
5
[% USE P %]
6

  
7
<div class="wrapper input-panel">
8
  <h3> [% "Parent Variant" | $T8 %]:
9
    [% SELF.part.parent_variant.presenter.part %]
10
    [% SELF.part.parent_variant.description %]
11
  </h3>
12
  <table class="tbl-list">
13
    <caption>
14
      [% LxERP.t8("Variant Property Values") %]
15
    </caption>
16
    <thead>
17
      <th>[% "Transled Value" | $T8 %]</th>
18
      <th>[% "Value" | $T8 %]</th>
19
      <th>[% "Abbreviation" | $T8 %]</th>
20
    </thead>
21
    <tbody class="row_entry listrow">
22
    [% FOREACH variant_property_value = SELF.part.variant_property_values %]
23
      <tr>
24
      [% # L.dump(variant_property_value) %]
25
        <td>[% variant_property_value.value_translated | html %]</td>
26
        <td>[% variant_property_value.value | html %]</td>
27
        <td>[% variant_property_value.abbreviation | html %]</td>
28
      </tr>
29
    [% END %]
30
    </tbody>
31
  </table>
32
</div>
templates/design40_webpages/part/_variants.html
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE LxERP %]
4
[% USE L %]
5
[% USE P %]
6

  
7
<div class="wrapper input-panel">
8
  <h3> [% LxERP.t8("Create new Variants") %] </h3>
9
  <div class="wrapper">
10
  [% FOREACH variant_property = SELF.part.variant_properties %]
11
    <div class="col input-panel" style="min-width:fit-content;">
12
      <h4>[% variant_property.name_translated | html %]</h4>
13
      [% L.select_tag("variant_properties." _ variant_property.id _ ".selected_property_values[]",
14
        variant_property.property_values,
15
        title_key='value_translated', value_key='id',
16
        id="selected_property_values_" _ variant_property.id,
17
        multiple=1,
18
      ) %]
19
      [% L.multiselect2side(
20
        "selected_property_values_" _ variant_property.id,
21
        labelsx=LxERP.t8("All Property Values"),
22
        labeldx=LxERP.t8("Selected Property Values")
23
      ) %]
24
    </div>
25
  [% END %]
26
  </div>
27
  [% L.button_tag('kivi.Part.create_variants();', LxERP.t8("Create Variants with selected Values")) %]
28
</div>
29

  
30
<br>
31

  
32
variants:
33
[% FOREACH variant = SELF.part.variants %]
34
  [% variant.partnumber %]:[% variant.description %]
35
[% END %]
36

  
37

  
templates/design40_webpages/part/form.html
20 20
  <ul class="ui-tabs">
21 21
    <li><a href="#basic_data">[% 'Basic Data' | $T8 %]</a></li>
22 22
    [% IF SELF.part.is_parent_variant && SELF.part.id %]
23
      <li><a href="#variants_tab">[% 'Variants' | $T8 %]</a></li>
23
      <li><a href="#parent_variant_tab">[% 'Variants' | $T8 %]</a></li>
24
    [% END %]
25
    [% IF SELF.part.is_variant && SELF.part.id %]
26
      <li><a href="#variant_tab">[% 'Variant Properties' | $T8 %]</a></li>
24 27
    [% END %]
25 28
    [% IF SELF.part.is_assortment %]
26 29
      <li><a href="#assortment_tab">[% 'Assortment items' | $T8 %]</a></li>
......
59 62
  </div>
60 63

  
61 64
  [% IF SELF.part.is_parent_variant && SELF.part.id %]
62
    <div id="variants_tab" class="ui-tabs-panel">
63
      [% PROCESS 'part/_variants.html' id=part.id %]
65
    <div id="parent_variant_tab" class="ui-tabs-panel">
66
      [% PROCESS 'part/_parent_variant.html' %]
67
    </div>
68
  [% END %]
69
  [% IF SELF.part.is_variant && SELF.part.id %]
70
    <div id="variant_tab" class="ui-tabs-panel">
71
      [% PROCESS 'part/_variant.html' %]
64 72
    </div>
65 73
  [% END %]
66 74

  

Auch abrufbar als: Unified diff