Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5de8b1cf

Von Werner Hahn vor fast 2 Jahren hinzugefügt

  • ID 5de8b1cf00d4132336f6a35f3f9b39cdafd4a29f
  • Vorgänger 25d211f2
  • Nachfolger f7f6f29a

Design 4.0 Shopartikel Kategorien Template angepasst

Unterschiede anzeigen:

templates/design40_webpages/shop_part/categories.html
9 9

  
10 10
<form action="controller.pl" method="post">
11 11
  [% BLOCK recurse %]
12
    [% # path = '' %]<!-- TODO: Pfad wg neuer Kategorie im Shop anlegen -->
13
    <ul>
14
      [% FOREACH obj = data %]
12
    [% FOREACH categorie = categories_array %]
13
      <ul>
15 14
        <li>
16
          [% checked = '' %]
17
          [% # path = path _ obj.name %]
18
          [% # test = path.split('\|') %]
19
          [% IF SELF.shop_part.shop_category.1.grep(obj.name).size %]
15
        [% checked = '' %]
16
        [% FOREACH cat_row = SELF.shop_part.shop_category %]
17
          [% IF (cat_row.0 == categorie.id) || (SELF.shop_part.shop.connector == 'shopware6' && cat_row == categorie.id) %]
20 18
            [% checked = 'checked' %]
21
          [% ELSE %]
22
            [% FOREACH cat_row = SELF.shop_part.shop_category %]
23
              [% IF cat_row.1.grep(obj.name).size %]
24
                [% checked = 'checked' %]
25
              [% END %]
26
            [% END %]
27 19
          [% END %]
28
          [% L.checkbox_tag('categories[]',value=obj.id, checked=checked) %][% HTML.escape(obj.name) %][% L.hidden_tag("cat_id_" _ obj.id, obj.name) %]
20
        [% END %]
21
        [% L.checkbox_tag('categories[]',value=categorie.id, checked=checked) %][% HTML.escape(categorie.name) %][% L.hidden_tag("cat_id_" _ categorie.id, categorie.name) %]
29 22
        </li>
30
        [% IF obj.childrenCount >= 1 %]
31
          [% # path = path _ '|' %]
32
          [% INCLUDE recurse data=obj.children %]
23
        [% IF categorie.children.size %]
24
          [% INCLUDE recurse categories_array=categorie.children %]
33 25
        [% END %]
34
      [% END %]
35
    </ul>
26
      </ul>
27
    [% END %]
36 28
  [% END %]
37 29
  <div>
38 30
    <h2>[% LxERP.t8("Shopcategories") %]</h2>
39
      [% FOREACH row = CATEGORIES %]
40
        <!-- TODO: Is still hardcoded 'Root' is shopware specified -->
41
        [% IF row.name == 'Root' %]
42
          [% IF row.childrenCount >= 1 %]
43
            [% path = '' %]
44
            [% INCLUDE recurse data=row.children path=path %]
45
          [% END %]
46
        [% END %]
47
      [% END %]
31
    [% INCLUDE recurse categories_array=CATEGORIES %]
48 32
  </div>
49 33
    [% L.button_tag("kivi.ShopPart.save_categories(" _ SELF.shop_part.id _", " _ SELF.shop_part.shop.id _")", LxERP.t8("Save"))  %]</td>
50 34
</form>

Auch abrufbar als: Unified diff