]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/part/_shop.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / part / _shop.html
1 [% USE HTML %]
2 [% USE L %]
3 [% USE P %]
4 [% USE LxERP %]
5 [% USE Dumper %]
6 [% USE JavaScript %]
7
8 <div class="wrapper">
9
10 <h2>[% LxERP.t8("Active shops:") %]</h2>
11
12 <table class="tbl-list">
13   <thead>
14     <tr>
15      <th>[% LxERP.t8("Shop") %]</th>
16      <th>[% LxERP.t8("Active") %]</th>
17      <th>[% LxERP.t8("Shop part") %]</th>
18      <th>[% LxERP.t8("Price source") %]</th>
19      <th>[% LxERP.t8("Price") %]</th>
20      <th>[% LxERP.t8("Stock Local/Shop") %]</th>
21      <th>[% LxERP.t8("Last update") %]</th>
22      <th>[% LxERP.t8("Action") %]</th>
23      <th>[% LxERP.t8("Action") %]</th>
24      <th>[% LxERP.t8("Action") %]</th>
25     </tr>
26   </thead>
27   <tbody>
28     [% # L.dump(SELF.part) %]
29     [% FOREACH shop_part = SELF.part.shop_parts %]
30       [% IF !shop_part.shop.obsolete %]
31         <tr>
32           <td>[% HTML.escape( shop_part.shop.description ) %]</td>
33           <td>[% L.html_tag('span', shop_part.active, id => 'shop_part_active_' _ shop_part.id ) %]</td>
34           <td>
35            [% IF shop_part.shop.use_part_longdescription %]
36              [% L.html_tag('span', shop_part.part.notes, id => 'shop_part_description_' _ shop_part.id ) %]
37            [% ELSE %]
38              [% L.html_tag('span', shop_part.shop_description, id => 'shop_part_description_' _ shop_part.id ) %]
39            [% END %]
40           </td>
41           <td>[% L.html_tag('span',LxERP.t8(), id => 'active_price_source_' _ shop_part.id) %]</td>
42           <td>[% L.html_tag('span','Price', id => 'price_' _ shop_part.id) %]</td>
43           <td>[% L.html_tag('span','Stock', id => 'stock_' _ shop_part.id) %]</td>
44           <td>[% L.html_tag('span', shop_part.last_update.to_kivitendo('precision' => 'minute'), id => 'shop_part_last_update_' _ shop_part.id ) %]</td>
45           <td>[% L.button_tag("kivi.ShopPart.edit_shop_part(" _ shop_part.id _ ")", LxERP.t8("Edit"))  %]</td>
46           <td>[% L.button_tag("kivi.ShopPart.update_shop_part(" _ shop_part.id _ ")", LxERP.t8("Upload"))  %]</td>
47           <td>
48             [% L.button_tag("kivi.ShopPart.get_all_categories(" _ shop_part.id _ ")", LxERP.t8("Shopcategories"))  %]<br>
49             [% IF shop_part.shop_category %]
50               [% IF shop_part.shop_category.1.size > 1%]
51                 [% FOREACH cat = shop_part.shop_category %]
52                   [% HTML.escape(cat.1) %]<br>
53                 [% END %]
54               [% ELSE %]
55                 [% HTML.escape(shop_part.shop_category.1) %]<br>
56               [% END %]
57             [% END %]
58             <script type="text/javascript">
59               $(function() {
60                 kivi.ShopPart.update_price_n_price_source([% shop_part.id %],'[% shop_part.active_price_source %]');
61                 kivi.ShopPart.update_stock([% shop_part.id %]);
62               });
63             </script>
64           </td>
65         </tr>
66       [% END %]
67     [% END %]
68     [% FOREACH shop = SELF.shops_not_assigned %]
69       <tr>
70         <td>[% HTML.escape( shop.description ) %]</td>
71         <td></td>
72         <td></td>
73         <td></td>
74         <td></td>
75         <td></td>
76         <td>[% L.button_tag("kivi.ShopPart.create_shop_part(" _ id _ ", " _ shop.id _ ")", LxERP.t8("Add"))  %]</td>
77       </tr>
78     [% END %]
79   </tbody>
80 </table>
81
82
83 [% # L.dump(shop_part) %]
84 <h2>[% LxERP.t8("Shopimages - valid for all shops") %]</h2>
85 [% IF shop_part.part_id %]
86   <script type="text/javascript">
87     $(function() {
88       kivi.ShopPart.show_images([% shop_part.part_id %]);
89     });
90   </script>
91   <div id="shop_images"></div>
92 [% ELSE %]
93   <div id="shop_images">[% LxERP.t8('To upload images: Please create shoppart first') %]</div>
94 [% END %]
95
96 </div><!-- /wrapper -->
97