Revision 563a8c16
Von Hans P. Schlaepfer vor etwa 4 Jahren hinzugefügt
templates/webpages/shop_part/_list_articles.html | ||
---|---|---|
4 | 4 |
[% USE T8 %] |
5 | 5 |
|
6 | 6 |
<h1>[% title %]</h1> |
7 |
[%- PROCESS 'shop_part/_filter.html' filter=SELF.models.filtered.laundered %] |
|
8 |
<hr> |
|
7 |
|
|
8 |
[% PROCESS 'shop_part/_filter.html' filter=SELF.models.filtered.laundered %] |
|
9 |
|
|
9 | 10 |
<form method="post" action="controller.pl" name="shop_parts" id="shopparts"> |
10 |
<div class="data_count">[% 'Number of Data: ' | $T8 %] [% SHOP_PARTS.size %]</div> |
|
11 |
<table id="shoplist" width="100%" > |
|
12 |
<thead> |
|
13 |
<tr class="listheading"> |
|
14 |
<th>[% L.checkbox_tag('check_all') %]</th> |
|
15 |
<th>[% IF FORM.sort_by == 'shop.description' %] |
|
16 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=shop.description&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
17 |
[% 'Shop Host/Connector' | $T8 %][% IF FORM.sort_dir == 0 %]<img border="0" src="image/down.png">[% ELSE %]<img border="0" src="image/up.png">[% END %]</a> |
|
18 |
[% ELSE %] |
|
19 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=shop.description&sort_dir=0" class="sort_link"> |
|
20 |
[% 'Shop Host/Connector' | $T8 %]</a> |
|
21 |
[% END %] |
|
11 |
<div class="wrapper"> |
|
12 |
<div class="data_count message message_hint">[% 'Number of Data: ' | $T8 %] [% SHOP_PARTS.size %]</div> |
|
13 |
</div> |
|
14 |
|
|
15 |
[% IF SHOP_PARTS.size > 0 %] |
|
16 |
|
|
17 |
<table id="shoplist" class="tbl-list"> |
|
18 |
<thead> |
|
19 |
<tr> |
|
20 |
<th>[% L.checkbox_tag('check_all') %]</th> |
|
21 |
<th> |
|
22 |
[% IF FORM.sort_by == 'shop.description' %] |
|
23 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=shop.description&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
24 |
[% 'Shop Host/Connector' | $T8 %][% IF FORM.sort_dir == 0 %]<img src="image/down.png">[% ELSE %]<img src="image/up.png">[% END %] |
|
25 |
</a> |
|
26 |
[% ELSE %] |
|
27 |
<a href="controller.pl?action=ShopPart/list_articles&sort_by=shop.description&sort_dir=0" class="sort_link"> [% 'Shop Host/Connector' | $T8 %]</a> |
|
28 |
[% END %] |
|
22 | 29 |
</th> |
23 |
<th>[% IF FORM.sort_by == 'part.partnumber' %] |
|
24 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.partnumber&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
25 |
[% 'Partnumber' | $T8 %][% IF FORM.sort_dir == 0 %]<img border="0" src="image/down.png">[% ELSE %]<img border="0" src="image/up.png">[% END %]</a> |
|
26 |
[% ELSE %] |
|
27 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.partnumber&sort_dir=0" class="sort_link"> |
|
28 |
[% 'Partnumber' | $T8 %]</a> |
|
29 |
[% END %] |
|
30 |
<th> |
|
31 |
[% IF FORM.sort_by == 'part.partnumber' %] |
|
32 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.partnumber&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
33 |
[% 'Partnumber' | $T8 %][% IF FORM.sort_dir == 0 %]<img src="image/down.png">[% ELSE %]<img src="image/up.png">[% END %] |
|
34 |
</a> |
|
35 |
[% ELSE %] |
|
36 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.partnumber&sort_dir=0" class="sort_link"> |
|
37 |
[% 'Partnumber' | $T8 %] |
|
38 |
</a> |
|
39 |
[% END %] |
|
30 | 40 |
</th> |
31 |
<th>[% IF FORM.sort_by == 'part.description' %] |
|
32 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.description&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
33 |
[% 'Description' | $T8 %][% IF FORM.sort_dir == 0 %]<img border="0" src="image/down.png">[% ELSE %]<img border="0" src="image/up.png">[% END %]</a> |
|
34 |
[% ELSE %] |
|
35 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.description&sort_dir=0" class="sort_link"> |
|
36 |
[% 'Description' | $T8 %]</a> |
|
37 |
[% END %] |
|
41 |
<th> |
|
42 |
[% IF FORM.sort_by == 'part.description' %] |
|
43 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.description&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
44 |
[% 'Description' | $T8 %][% IF FORM.sort_dir == 0 %]<img src="image/down.png">[% ELSE %]<img src="image/up.png">[% END %] |
|
45 |
</a> |
|
46 |
[% ELSE %] |
|
47 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.description&sort_dir=0" class="sort_link"> |
|
48 |
[% 'Description' | $T8 %] |
|
49 |
</a> |
|
50 |
[% END %] |
|
38 | 51 |
</th> |
39 |
<th>[% 'Info' | $T8 %]</th> |
|
40 |
<th>[% 'Active' | $T8 %]</th> |
|
41 |
<th>[% 'Price source' | $T8 %]</th> |
|
42 |
<th>[% 'Price' | $T8 %]</th> |
|
43 |
<th>[% IF FORM.sort_by == 'part.onhand' %] |
|
44 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.onhand&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
45 |
[% 'Stock Local/Shop' | $T8 %][% IF FORM.sort_dir == 0 %]<img border="0" src="image/down.png">[% ELSE %]<img border="0" src="image/up.png">[% END %]</a> |
|
46 |
[% ELSE %] |
|
47 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.onhand&sort_dir=0" class="sort_link"> |
|
48 |
[% 'Stock Local/Shop' | $T8 %]</a> |
|
49 |
[% END %] |
|
52 |
<th>[% 'Info' | $T8 %]</th> |
|
53 |
<th>[% 'Active' | $T8 %]</th> |
|
54 |
<th>[% 'Price source' | $T8 %]</th> |
|
55 |
<th>[% 'Price' | $T8 %]</th> |
|
56 |
<th> |
|
57 |
[% IF FORM.sort_by == 'part.onhand' %] |
|
58 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.onhand&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
59 |
[% 'Stock Local/Shop' | $T8 %][% IF FORM.sort_dir == 0 %]<img src="image/down.png">[% ELSE %]<img src="image/up.png">[% END %] |
|
60 |
</a> |
|
61 |
[% ELSE %] |
|
62 |
<a href="controller.pl?action=ShopPart/list_articles&sort_by=part.onhand&sort_dir=0" class="sort_link"> [% 'Stock Local/Shop' | $T8 %]</a> |
|
63 |
[% END %] |
|
50 | 64 |
</th> |
51 |
<th>[% 'Last update' | $T8 %]</th> |
|
52 |
<th>[% 'Images' | $T8 %]</th> |
|
53 |
<th>[% IF FORM.sort_by == 'part.partsgroup_id' %] |
|
54 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.partsgroup_id&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
55 |
[% 'Category' %][% IF FORM.sort_dir == 0 %]<img border="0" src="image/down.png">[% ELSE %]<img border="0" src="image/up.png">[% END %]</a> |
|
56 |
[% ELSE %] |
|
57 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.partsgroup_id&sort_dir=0" class="sort_link"> |
|
58 |
[% 'Category' | $T8 %]</a> |
|
59 |
[% END %] |
|
65 |
<th>[% 'Last update' | $T8 %]</th> |
|
66 |
<th>[% 'Images' | $T8 %]</th> |
|
67 |
<th> |
|
68 |
[% IF FORM.sort_by == 'part.partsgroup_id' %] |
|
69 |
<a href ="controller.pl?action=ShopPart/list_articles&sort_by=part.partsgroup_id&sort_dir=[% 1 - FORM.sort_dir %]" class="sort_link"> |
|
70 |
[% 'Category' %][% IF FORM.sort_dir == 0 %]<img src="image/down.png">[% ELSE %]<img src="image/up.png">[% END %] |
|
71 |
</a> |
|
72 |
[% ELSE %] |
|
73 |
<a href="controller.pl?action=ShopPart/list_articles&sort_by=part.partsgroup_id&sort_dir=0" class="sort_link"> [% 'Category' | $T8 %]</a> |
|
74 |
[% END %] |
|
60 | 75 |
</th> |
61 |
</tr>
|
|
76 |
</tr> |
|
62 | 77 |
</thead> |
63 |
[%- FOREACH shop_part = SHOP_PARTS %] |
|
64 |
[%- # IF shop_part.shop.obsolete %] |
|
65 |
<tr class="listrow"> |
|
66 |
<td>[% L.checkbox_tag('shop_parts_ids[]', checked=0, value=shop_part.id) %]</td> |
|
67 |
<td>[% HTML.escape( shop_part.shop.description ) %]/[% HTML.escape( shop_part.shop.connector ) %]</td> |
|
68 |
<td>[% HTML.escape( shop_part.part.partnumber ) %]</td> |
|
69 |
<td><a href="controller.pl?part.id=[% shop_part.part.id %]&action=Part/edit&callback=[% HTML.url('controller.pl?action=ShopPart/list_articles') %]#shop_variables">[% HTML.escape( shop_part.part.description ) %]</a></td> |
|
70 |
<td> |
|
71 |
[% IF shop_part.shop_description %] |
|
72 |
[% 'Info' | $T8 %] |
|
73 |
[% ELSE %] |
|
74 |
[% 'No Shopdescription' | $T8 %] |
|
75 |
[% END %] |
|
76 |
</td> |
|
77 |
<td style="vertical-align:middle;text-align:center;"> |
|
78 |
[% IF shop_part.active %] |
|
79 |
<div id="toogle_[% shop_part.id %]" style="background-image:url(image/gruener_punkt.gif);background-repeat:no-repeat;witdh:15px;height:15px;"> </div> |
|
80 |
[% ELSE %] |
|
81 |
<div id="toogle_[% shop_part.id %]" style="background-image:url(image/roter_punkt.gif);background-repeat:no-repeat;witdh:15px;height:15px;"> </div> |
|
82 |
[% END %] |
|
83 |
</td> |
|
84 |
<td>[% L.html_tag('span',LxERP.t8(), id => 'active_price_source_' _ shop_part.id) %] </td> |
|
85 |
<td>[% L.html_tag('span','Price', id => 'price_' _ shop_part.id) %]</td> |
|
86 |
<td>[% L.html_tag('span','Stock', id => 'stock_' _ shop_part.id) %]</td> |
|
87 |
<td>[% L.html_tag('span', shop_part.last_update.to_kivitendo('precision' => 'minute'), id => 'shop_part_last_update_' _ shop_part.id ) %]</td> |
|
88 |
<td> |
|
89 |
[% IF shop_part.images %] |
|
90 |
[% shop_part.images %] |
|
91 |
[% ELSE %] |
|
92 |
[% 'No Shopimages' | $T8 %] |
|
93 |
[% END %] |
|
94 |
</td> |
|
95 |
<td> |
|
96 |
[% IF shop_part.shop_category %] |
|
97 |
[% IF shop_part.shop_category.1.size > 1%] |
|
98 |
[% FOREACH cat = shop_part.shop_category %] |
|
99 |
[% HTML.escape(cat.1) %]<br> |
|
100 |
[% END %] |
|
78 |
<tbody> |
|
79 |
[% FOREACH shop_part = SHOP_PARTS %] |
|
80 |
[% # IF shop_part.shop.obsolete %] |
|
81 |
<tr> |
|
82 |
<td>[% L.checkbox_tag('shop_parts_ids[]', checked=0, value=shop_part.id) %]</td> |
|
83 |
<td>[% HTML.escape( shop_part.shop.description ) %]/[% HTML.escape( shop_part.shop.connector ) %]</td> |
|
84 |
<td>[% HTML.escape( shop_part.part.partnumber ) %]</td> |
|
85 |
<td> |
|
86 |
<a href="controller.pl?part.id=[% shop_part.part.id %]&action=Part/edit&callback=[% HTML.url('controller.pl?action=ShopPart/list_articles') %]#shop_variables"> |
|
87 |
[% HTML.escape( shop_part.part.description ) %] |
|
88 |
</a> |
|
89 |
</td> |
|
90 |
<td> |
|
91 |
[% IF shop_part.shop_description %] |
|
92 |
[% 'Info' | $T8 %] |
|
93 |
[% ELSE %] |
|
94 |
[% 'No Shopdescription' | $T8 %] |
|
95 |
[% END %] |
|
96 |
</td> |
|
97 |
<td style="vertical-align:middle;text-align:center;"> |
|
98 |
[% IF shop_part.active %] |
|
99 |
<div id="toogle_[% shop_part.id %]" style="background-image:url(image/gruener_punkt.gif);background-repeat:no-repeat;witdh:15px;height:15px;"> </div> |
|
100 |
[% ELSE %] |
|
101 |
<div id="toogle_[% shop_part.id %]" style="background-image:url(image/roter_punkt.gif);background-repeat:no-repeat;witdh:15px;height:15px;"> </div> |
|
102 |
[% END %] |
|
103 |
</td> |
|
104 |
<td>[% L.html_tag('span',LxERP.t8(), id => 'active_price_source_' _ shop_part.id) %]</td> |
|
105 |
<td>[% L.html_tag('span','Price', id => 'price_' _ shop_part.id) %]</td> |
|
106 |
<td>[% L.html_tag('span','Stock', id => 'stock_' _ shop_part.id) %]</td> |
|
107 |
<td>[% L.html_tag('span', shop_part.last_update.to_kivitendo('precision' => 'minute'), id => 'shop_part_last_update_' _ shop_part.id ) %]</td> |
|
108 |
<td> |
|
109 |
[% IF shop_part.images %] |
|
110 |
[% shop_part.images %] |
|
101 | 111 |
[% ELSE %] |
102 |
[% HTML.escape(shop_part.shop_category.1) %]<br>
|
|
112 |
[% 'No Shopimages' | $T8 %]
|
|
103 | 113 |
[% END %] |
104 |
[% END %] |
|
105 |
</td> |
|
106 |
<script type="text/javascript"> |
|
107 |
$(function() { |
|
108 |
kivi.ShopPart.update_price_n_price_source([% shop_part.id %],'[% shop_part.active_price_source %]'); |
|
109 |
kivi.ShopPart.update_stock([% shop_part.id %]); |
|
110 |
}); |
|
111 |
</script> |
|
112 |
</tr> |
|
113 |
[%- # END %] |
|
114 |
[%- END %] |
|
114 |
</td> |
|
115 |
<td> |
|
116 |
[% IF shop_part.shop_category %] |
|
117 |
[% IF shop_part.shop_category.1.size > 1%] |
|
118 |
[% FOREACH cat = shop_part.shop_category %] |
|
119 |
[% HTML.escape(cat.1) %]<br> |
|
120 |
[% END %] |
|
121 |
[% ELSE %] |
|
122 |
[% HTML.escape(shop_part.shop_category.1) %]<br> |
|
123 |
[% END %] |
|
124 |
[% END %] |
|
125 |
|
|
126 |
<script type="text/javascript"> |
|
127 |
$(function() { |
|
128 |
kivi.ShopPart.update_price_n_price_source([% shop_part.id %],'[% shop_part.active_price_source %]'); |
|
129 |
kivi.ShopPart.update_stock([% shop_part.id %]); |
|
130 |
}); |
|
131 |
</script> |
|
132 |
|
|
133 |
</td> |
|
134 |
|
|
135 |
</tr> |
|
136 |
[% # END %] |
|
137 |
[% END %] |
|
138 |
</tbody> |
|
115 | 139 |
</table> |
116 | 140 |
|
117 |
<hr>
|
|
118 |
<div> |
|
119 |
[% L.radio_button_tag('upload_todo', value='all', label= LxERP.t8('All Data')) %] |
|
120 |
[% L.radio_button_tag('upload_todo', value='price', label= LxERP.t8('Only Price')) %] |
|
121 |
[% L.radio_button_tag('upload_todo', value='stock', label= LxERP.t8('Only Stock')) %] |
|
122 |
[% L.radio_button_tag('upload_todo', value='price_stock', checked=1, label= LxERP.t8('Price and Stock')) %] |
|
141 |
<div class="wrapper">
|
|
142 |
<div class="buttons">
|
|
143 |
[% L.radio_button_tag('upload_todo', value='all', label= LxERP.t8('All Data')) %]<br>
|
|
144 |
[% L.radio_button_tag('upload_todo', value='price', label= LxERP.t8('Only Price')) %]<br>
|
|
145 |
[% L.radio_button_tag('upload_todo', value='stock', label= LxERP.t8('Only Stock')) %]<br>
|
|
146 |
[% L.radio_button_tag('upload_todo', value='price_stock', checked=1, label= LxERP.t8('Price and Stock')) %]<br>
|
|
123 | 147 |
[% L.button_tag("kivi.ShopPart.setup();", LxERP.t8("Upload all marked"), id="mass_transfer") %] |
124 | 148 |
</div> |
125 |
<div id="status_mass_upload" style="display: none;"> |
|
126 |
[%- INCLUDE 'shop_part/_upload_status.html' %] |
|
127 |
</div> |
|
149 |
<div id="status_mass_upload" style="display: none;">[% INCLUDE 'shop_part/_upload_status.html' %] </div> |
|
150 |
</div><!-- /.wrapper --> |
|
151 |
|
|
152 |
[% END %] |
|
128 | 153 |
</form> |
129 |
<hr> |
|
130 |
<script type="text/javascript"> |
|
131 |
<!-- |
|
132 | 154 |
|
133 |
$(function() { |
|
134 |
$('#check_all').checkall('INPUT[name^="shop_parts_ids"]'); |
|
135 |
}); |
|
136 |
--> |
|
137 |
</script> |
|
155 |
<script type="text/javascript"><!-- |
|
156 |
$(function() { |
|
157 |
$('#check_all').checkall('INPUT[name^="shop_parts_ids"]'); |
|
158 |
}); |
|
159 |
--></script> |
Auch abrufbar als: Unified diff
Neues Design 2019 Standard-Code templates/webpages/shop_part/_list_articles.html