Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8a0d2996

Von Tamino Steinert vor 6 Monaten hinzugefügt

  • ID 8a0d29968757bfba2f0a06dfa07b650eaffc4ef7
  • Vorgänger bc8ddcc1
  • Nachfolger e4982f5b

Varianten: einfachen Artikel in Variante umwandeln

Unterschiede anzeigen:

templates/design40_webpages/part/_parent_variant.html
53 53
    <div class="wrapper">
54 54
    [% FOREACH variant_property = SELF.part.variant_properties %]
55 55
      <div class="col input-panel" style="min-width:fit-content;">
56
        <h4>[% variant_property.name_translated | html %]</h4>
57
        [% L.select_tag("variant_properties." _ variant_property.id _ ".selected_property_values[]",
56
        <h4>[% variant_property.displayable_name | html %]</h4>
57
        [% L.select_tag("variant_properties." _ variant_property.id _ ".selected_property_value_ids[]",
58 58
          variant_property.property_values,
59 59
          title_key='displayable_name', value_key='id',
60
          id="selected_property_values_" _ variant_property.id,
60
          id="selected_property_value_ids_" _ variant_property.id,
61 61
          multiple=1,
62 62
        ) %]
63 63
        [% L.multiselect2side(
64
          "selected_property_values_" _ variant_property.id,
64
          "selected_property_value_ids_" _ variant_property.id,
65 65
          labelsx=LxERP.t8("All Property Values"),
66 66
          labeldx=LxERP.t8("Selected Property Values")
67 67
        ) %]
......
70 70
    </div>
71 71
    [% L.button_tag('kivi.Part.create_variants();', LxERP.t8("Create Variants with selected Values")) %]
72 72
  </div>
73

  
74
  <div class="wrapper input-panel">
75
    <h3> [% LxERP.t8("Convert part to Variant") %] </h3>
76
    <table class="tbl-list">
77
      <caption>
78
        [% 'Variant Properties' | $T8 %]
79
      </caption>
80
      <thead>
81
        <tr>
82
          <th>[% 'Name' | $T8 %]</th>
83
          <th>[% 'Value' | $T8 %]</th>
84
        </tr>
85
      </thead>
86
      <tbody>
87
        [% FOREACH variant_property = SELF.part.variant_properties %]
88
        <tr>
89
          <td>[% variant_property.displayable_name | html %]</td>
90
          <td>
91
          [% L.select_tag("convert_part.variant_properties." _ variant_property.id _ ".selected_property_value_id",
92
            variant_property.property_values,
93
            title_key='displayable_name', value_key='id',
94
            size=variant_property.property_values.size,
95
          ) %]
96
        </tr>
97
        [% END %]
98
      </tbody>
99
    </table>
100
    <label for="convert_part.id">[% 'Part to convert:' | $T8 %]</label>
101
    [% P.part.picker('convert_part.id', undef,
102
      part_type=SELF.part.part_type, variant_type='single',
103
      placeholder=(LxERP.t8('Type:') _ ' ' _ LxERP.t8(SELF.part.part_type)),
104
      class="wi-wide"
105
    ) %]
106
    <br>
107
    <br>
108
    [% L.button_tag('kivi.Part.convert_part_to_variant();', LxERP.t8("Convert")) %]
109
  </div>
73 110
</div>
74 111

  
75 112

  

Auch abrufbar als: Unified diff