Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision bf0f9ff5

Von Hans P. Schlaepfer vor fast 4 Jahren hinzugefügt

  • ID bf0f9ff51db523b028d9b57f881dfe5aae12ae40
  • Vorgänger c7d247b2
  • Nachfolger ecfbe7ca

Neues Design 2019 Standard-Code templates/webpages/part/_shop.html

Unterschiede anzeigen:

templates/webpages/part/_shop.html
1
<div id="shop_variables">
2
 <h2>[% LxERP.t8("Active shops:") %]</h2>
3
 <table width="100%">
4 1
[% USE HTML %]
5 2
[% USE L %]
6 3
[% USE P %]
......
8 5
[% USE Dumper %]
9 6
[% USE JavaScript %]
10 7

  
8
<div class="wrapper">
9

  
10
<h2>[% LxERP.t8("Active shops:") %]</h2>
11

  
12
<table class="tbl-list">
11 13
  <thead>
12
  <tr class="listheading">
13
   <th>[% LxERP.t8("Shop") %]</th>
14
   <th>[% LxERP.t8("Active") %]</th>
15
   <th>[% LxERP.t8("Shop part") %]</th>
16
   <th>[% LxERP.t8("Price source") %]</th>
17
   <th>[% LxERP.t8("Price") %]</th>
18
   <th>[% LxERP.t8("Stock Local/Shop") %]</th>
19
   <th>[% LxERP.t8("Last update") %]</th>
20
   <th>[% LxERP.t8("Action") %]</th>
21
   <th>[% LxERP.t8("Action") %]</th>
22
   <th>[% LxERP.t8("Action") %]</th>
23
  </tr>
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>
24 26
  </thead>
25
  [% # L.dump(SELF.part) %]
26
  [%- FOREACH shop_part = SELF.part.shop_parts %]
27
  [% IF !shop_part.shop.obsolete %]
28
  <tr class="listrow">
29
   <td>[% HTML.escape( shop_part.shop.description ) %]</td>
30
   <td>[% L.html_tag('span', shop_part.active, id => 'shop_part_active_' _ shop_part.id ) %]</td>
31
   <td>[% L.html_tag('span', shop_part.shop_description, id => 'shop_part_description_' _ shop_part.id ) %]</td>
32
   <td>[% L.html_tag('span',LxERP.t8(), id => 'active_price_source_' _ shop_part.id) %] </td>
33
   <td>[% L.html_tag('span','Price', id => 'price_' _ shop_part.id) %]</td>
34
   <td>[% L.html_tag('span','Stock', id => 'stock_' _ shop_part.id) %]</td>
35
   <td>[% L.html_tag('span', shop_part.last_update.to_kivitendo('precision' => 'minute'), id => 'shop_part_last_update_' _ shop_part.id ) %]</td>
36
   <td>[% L.button_tag("kivi.ShopPart.edit_shop_part(" _ shop_part.id _ ")", LxERP.t8("Edit"))  %]</td>
37
   <td>[% L.button_tag("kivi.ShopPart.update_shop_part(" _ shop_part.id _ ")", LxERP.t8("Upload"))  %]</td>
38
   <td>[% L.button_tag("kivi.ShopPart.get_all_categories(" _ shop_part.id _ ")", LxERP.t8("Shopcategories"))  %]<br>
39
    [% IF shop_part.shop_category %]
40
      [% IF shop_part.shop_category.1.size > 1%]
41
        [% FOREACH cat = shop_part.shop_category %]
42
          [% HTML.escape(cat.1) %]<br>
43
        [% END %]
44
      [% ELSE %]
45
        [% HTML.escape(shop_part.shop_category.1) %]<br>
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>[% L.html_tag('span', shop_part.shop_description, id => 'shop_part_description_' _ shop_part.id ) %]</td>
35
          <td>[% L.html_tag('span',LxERP.t8(), id => 'active_price_source_' _ shop_part.id) %]</td>
36
          <td>[% L.html_tag('span','Price', id => 'price_' _ shop_part.id) %]</td>
37
          <td>[% L.html_tag('span','Stock', id => 'stock_' _ shop_part.id) %]</td>
38
          <td>[% L.html_tag('span', shop_part.last_update.to_kivitendo('precision' => 'minute'), id => 'shop_part_last_update_' _ shop_part.id ) %]</td>
39
          <td>[% L.button_tag("kivi.ShopPart.edit_shop_part(" _ shop_part.id _ ")", LxERP.t8("Edit"))  %]</td>
40
          <td>[% L.button_tag("kivi.ShopPart.update_shop_part(" _ shop_part.id _ ")", LxERP.t8("Upload"))  %]</td>
41
          <td>
42
            [% L.button_tag("kivi.ShopPart.get_all_categories(" _ shop_part.id _ ")", LxERP.t8("Shopcategories"))  %]<br>
43
            [% IF shop_part.shop_category %]
44
              [% IF shop_part.shop_category.1.size > 1%]
45
                [% FOREACH cat = shop_part.shop_category %]
46
                  [% HTML.escape(cat.1) %]<br>
47
                [% END %]
48
              [% ELSE %]
49
                [% HTML.escape(shop_part.shop_category.1) %]<br>
50
              [% END %]
51
            [% END %]
52
            <script type="text/javascript">
53
              $(function() {
54
                kivi.ShopPart.update_price_n_price_source([% shop_part.id %],'[% shop_part.active_price_source %]');
55
                kivi.ShopPart.update_stock([% shop_part.id %]);
56
              });
57
            </script>
58
          </td>
59
        </tr>
46 60
      [% END %]
47 61
    [% END %]
48
   </td>
49
  </tr>
50
  <script type="text/javascript">
51
    $(function() {
52
      kivi.ShopPart.update_price_n_price_source([% shop_part.id %],'[% shop_part.active_price_source %]');
53
      kivi.ShopPart.update_stock([% shop_part.id %]);
54
    });
55
  </script>
56
  [% END %]
57
  [%- END %]
58
  [%- FOREACH shop = SELF.shops_not_assigned %]
59
  <tr>
60
   <td>[% HTML.escape( shop.description ) %]</td>
61
   <td></td>
62
   <td></td>
63
   <td></td>
64
   <td></td>
65
   <td></td>
66
   <td>[% L.button_tag("kivi.ShopPart.create_shop_part(" _ id _ ", " _ shop.id _ ")", LxERP.t8("Add"))  %]</td>
67
  </tr>
68
  </thead>
69
  [%- END %]
62
    [% FOREACH shop = SELF.shops_not_assigned %]
63
      <tr>
64
        <td>[% HTML.escape( shop.description ) %]</td>
65
        <td></td>
66
        <td></td>
67
        <td></td>
68
        <td></td>
69
        <td></td>
70
        <td>[% L.button_tag("kivi.ShopPart.create_shop_part(" _ id _ ", " _ shop.id _ ")", LxERP.t8("Add"))  %]</td>
71
      </tr>
72
    [% END %]
73
  </tbody>
70 74
</table>
71 75

  
72 76

  
73 77
[% # L.dump(shop_part) %]
74 78
<h2>[% LxERP.t8("Shopimages - valid for all shops") %]</h2>
75
  [%- IF shop_part.part_id %]
76
    <script type="text/javascript">
77
      $(function() {
78
        kivi.ShopPart.show_images([% shop_part.part_id %]);
79
      });
80
    </script>
81
    <div id="shop_images" border=1 ></div>
82
  [%- ELSE %]
83
    <div id="shop_images" border=1 >[% LxERP.t8('To upload images: Please create shoppart first') %]</div>
84
  [%- END %]
85
</div>
79
[% IF shop_part.part_id %]
80
  <script type="text/javascript">
81
    $(function() {
82
      kivi.ShopPart.show_images([% shop_part.part_id %]);
83
    });
84
  </script>
85
  <div id="shop_images"></div>
86
[% ELSE %]
87
  <div id="shop_images">[% LxERP.t8('To upload images: Please create shoppart first') %]</div>
88
[% END %]
89

  
90
</div><!-- /wrapper -->
86 91

  

Auch abrufbar als: Unified diff