test action
[kivitendo-erp.git] / templates / webpages / shop_part / categories.html
1 [%- USE HTML %]
2 [%- USE T8 %]
3 [%- USE L -%]
4 [%- USE P -%]
5 [%- USE LxERP -%]
6 [%- USE Dumper -%]
7
8 [%  LxERP.t8("Part") %]: [% HTML.escape(SELF.shop_part.part.displayable_name) %]<br>
9 [%  LxERP.t8("Shop") %]: [% HTML.escape(SELF.shop_part.shop.description) %]<br>
10
11 <form action="controller.pl" method="post">
12   [% BLOCK recurse %]
13       [% FOREACH categorie = categories_array %]
14         <ul>
15           <li>
16           [% checked = '' %]
17           [% FOREACH cat_row = SELF.shop_part.shop_category %]
18             [% IF cat_row.0 == categorie.id %]
19               [% checked = 'checked' %]
20             [% END %]
21           [% END %]
22             [% L.checkbox_tag('categories[]',value=categorie.id, checked=checked) %][% HTML.escape(categorie.name) %][% L.hidden_tag("cat_id_" _ categorie.id, categorie.name) %]
23           </li>
24           [% IF categorie.children.size %]
25             [% INCLUDE recurse categories_array=categorie.children %]
26           [% END %]
27         </ul>
28     [% END %]
29   [% END %]
30   <div><h2>[% LxERP.t8("Shopcategories") %]</h2>
31     [% # Dumper.dump_html( CATEGORIES ) %]
32     [% INCLUDE recurse categories_array=CATEGORIES %]
33   </div>
34     [% L.button_tag("kivi.ShopPart.save_categories(" _ SELF.shop_part.id _", " _ SELF.shop_part.shop.id _")", LxERP.t8("Save"))  %]</td>
35 </form>