Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4ea81285

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

  • ID 4ea81285062113d15f531839c552e923e86725ee
  • Vorgänger 97e4d00e
  • Nachfolger 9a5a89da

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

Unterschiede anzeigen:

templates/webpages/part/_assembly.html
4 4
[% USE L %]
5 5
[% USE P %]
6 6

  
7
<div id="assembly" name="assembly">
8

  
9
<h2>[% 'Assembly items' | $T8 %]</h2>
7
<div id="assembly">
10 8

  
11 9
[% L.hidden_tag('assembly_id', SELF.part.id) %]
12 10

  
13
<table id="assembly_items">
14
 <thead>
15
   <tr class="listheading">
16
     <th class="listheading" style='display:none'></th>
17
     [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
18
     <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
19
     [% END %]
20
     <th class="listheading" nowrap width="3" >[%- 'position'     | $T8 %] </th>
21
     [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
22
     <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
23
     [% END %]
24
     <th id="partnumber_header_id"  class="listheading" nowrap width="5"><a href='#' onClick='javascript:kivi.Part.reorder_items("partnumber")' >[%- 'Partnumber'  | $T8 %]</a></th>
25
     <th class="listheading" nowrap width="5">[% 'Type' | $T8 %]</th>
26
     <th id="partdescription_header_id"  class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.Part.reorder_items("description")' >[%- 'Description' | $T8 %]</a></th>
27
     <th id="qty_header_id"         class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Part.reorder_items("qty")'        >[%- 'Qty'         | $T8 %]</a></th>
28
     <th class="listheading" nowrap width="5" >[%- 'Unit'         | $T8 %] </th>
29
     <th class="listheading" nowrap width="5" >[%- 'BOM'          | $T8 %] </th>
30
     <th class="listheading" nowrap width="5" >[%- 'Line Total'   | $T8 %] </th>
31
     <th id="sellprice_header_id"   class="listheading" nowrap width="10" ><a href='#' onClick='javascript:kivi.Part.reorder_items("sellprice")' >[%- 'Sellprice'       | $T8 %]</a></th>
32
     <th id="lastcost_header_id"   class="listheading" nowrap width="10" ><a href='#' onClick='javascript:kivi.Part.reorder_items("lastcost")'   >[%- 'Lastcost'       | $T8 %]</a></th>
33
     <th id="_header_id"   class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Part.reorder_items("partsgroup")'         >[%- 'Partsgroup'       | $T8 %]</a></th>
34
   </tr>
35
 </thead>
36
<tbody id="assembly_rows">
37
  [% assembly_html %]
38
</tbody>
39
<tbody id="assembly_input">
40
<tr>
41
 [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
42
 <td></td>
43
 <td></td>
44
 <td align="right">[% 'Part' | $T8 %]:</td>
45
 <td>[% P.part.picker('add_items[+].parts_id', '', style='width: 300px', multiple=1, id='assembly_picker', action={set_multi_items='kivi.Part.set_multi_assembly_items', commit_one='kivi.Part.add_assembly_item'}) %]</td>
46
 <td>[%- L.button_tag("kivi.Part.add_assembly_item()", LxERP.t8("Add")) %]</td>
47
 <td>[% L.button_tag('$("#assembly_picker").data("part_picker").open_dialog()', LxERP.t8('Add multiple items')) %]</td>
48
 <td>[% L.hidden_tag('add_items[].qty_as_number', 1) %]</td>
49
 [% ELSE %]
50
 <td></td>
51
 <td></td>
52
 <td></td>
53
 <td></td>
54
 <td></td>
55
 <td></td>
56
 [% END %]
57
 <td align="right">[% 'Totals' | $T8 %]:</td>
58
 <td></td>
59
 <td id="items_sellprice_sum" class="numeric">[%- LxERP.format_amount(items_sellprice_sum, 2, 0) %]</td>
60
 <td id="items_lastcost_sum"  class="numeric">[%- LxERP.format_amount(items_lastcost_sum,  2, 0) %]</td>
61
 <td id="items_sum_diff"      class="numeric">[%- LxERP.format_amount(items_sum_diff,      2, 0) %]</td>
62
</tr>
63
<tr>
64
 [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
65
 <td></td>
66
 <td></td>
67
 [% END %]
68
 <td></td>
69
 <td></td>
70
 <td></td>
71
 <td></td>
72
 <td></td>
73
 <td></td>
74
 <td></td>
75
 <td align="right">[% L.button_tag("kivi.Part.set_assembly_sellprice()", LxERP.t8("Set sellprice")) %]</td>
76
 <td></td>
77
</tr>
78
</tbody>
79
</table>
80 11

  
81
[% L.sortable_element('#assembly_rows') %]
82

  
83
<div>
84
<p>
85
</p>
12
<div class="wrapper">
13
<table id="assembly_items" class="tbl-list">
14
  <caption>[% 'Assembly items' | $T8 %]</caption>
15
  <thead>
16
    <tr>
17
      <th style="display:none"></th>
18
      [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
19
        <th class="img"><img src="image/close.png" alt="[% LxERP.t8('delete item') %]"></th>
20
      [% END %]
21
      <th>[% 'position' | $T8 %]</th>
22
      [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
23
        <th style="img"><img src="image/updown.png" alt="[% LxERP.t8('reorder item') %]"></th>
24
      [% END %]
25
      <th id="partnumber_header_id"><a href="#" onclick="kivi.Part.reorder_items('partnumber')">[% 'Partnumber' | $T8 %]</a></th>
26
      <th>[% 'Type' | $T8 %]</th>
27
      <th id="partdescription_header_id"><a href="#" onclick="kivi.Part.reorder_items('description')">[% 'Description' | $T8 %]</a></th>
28
      <th id="qty_header_id"><a href="#" onclick="kivi.Part.reorder_items('qty')">[% 'Qty' | $T8 %]</a></th>
29
      <th>[% 'Unit' | $T8 %]</th>
30
      <th class="right">[% 'BOM' | $T8 %]</th>
31
      <th class="right">[% 'Line Total' | $T8 %]</th>
32
      <th id="sellprice_header_id"><a href="#" onclick="kivi.Part.reorder_items('sellprice')">[% 'Sellprice'| $T8 %]</a></th>
33
      <th id="lastcost_header_id"><a href="#" onclick="kivi.Part.reorder_items('lastcost')">[% 'Lastcost' | $T8 %]</a></th>
34
      <th id="_header_id"><a href="#" onclick="kivi.Part.reorder_items('partsgroup')">[% 'Partsgroup' | $T8 %]</a></th>
35
    </tr>
36
  </thead>
37
  <tbody id="assembly_rows">
38
    [% assembly_html %]
39
  </tbody>
40
  <tfoot id="assembly_input">
41
    <tr>
42
      [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
43
        <td></td>
44
        <td></td>
45
        <th>[% 'Part' | $T8 %]</th>
46
        <td colspan="4">
47
          [% P.part.picker(
48
              'add_items[+].parts_id', 
49
              '', 
50
              class='wi-normal', 
51
              multiple='1', 
52
              id='assembly_picker', 
53
              action={set_multi_items='kivi.Part.set_multi_assembly_items', commit_one='kivi.Part.add_assembly_item'}
54
          ) %]
55
          [% L.button_tag("kivi.Part.add_assembly_item()", LxERP.t8("Add")) %]
56
          [% L.hidden_tag('add_items[].qty_as_number', 1) %]
57
        </td>
58
      [% ELSE %]
59
        <td></td>
60
        <td></td>
61
        <td colspan="4"></td>
62
      [% END %]
63
      <td colspan="2" class="right">[% #'Totals' | $T8 %][% #":" %]</td>
64
      <td id="items_sellprice_sum" class="numeric">[% LxERP.format_amount(items_sellprice_sum, 2, 0) %]</td>
65
      <td id="items_lastcost_sum" class="numeric">[% LxERP.format_amount(items_lastcost_sum, 2, 0) %]</td>
66
      <td id="items_sum_diff" class="numeric">[% LxERP.format_amount(items_sum_diff, 2, 0) %]</td>
67
      <td></td>
68
    </tr>
69
    <tr class="blank">
70
      [% IF SELF.orphaned || AUTH.assert('assembly_edit', 1) %]
71
        <td></td>
72
        <td></td>
73
      [% END %]
74
      <td colspan="4">[% L.button_tag('$("#assembly_picker").data("part_picker").open_dialog()', LxERP.t8('Add multiple items'), class="neutral") %]</td>
75
      <td></td>
76
      <!--<td></td> <td></td><td></td> -->
77
      <td colspan="4" class="right">[% L.button_tag("kivi.Part.set_assembly_sellprice()", LxERP.t8("Set sellprice")) %]</td>
78
      <td colspan="2"></td>
79
    </tr>
80
  </tfoot>
81
</table>
86 82
</div>
87 83

  
88

  
89
</div>
84
[% L.sortable_element('#assembly_rows') %]
90 85

  
91 86
<script type="text/javascript">
92 87
  $(function() {
......
100 95
    });
101 96
  })
102 97
</script>
98

  
99
</div>
templates/webpages/part/_assembly_row.html
1
  <tr class="listrow[% listrow %] assembly_item_row">
2
    <td style='display:none'>
3
      [% IF orphaned || AUTH.assert('assembly_edit', 1) %]
4 1
[% USE T8 %]
5 2
[% USE HTML %]
6 3
[% USE LxERP %]
7 4
[% USE L %]
8 5
[% USE P %]
6

  
7
<tr class="assembly_item_row">
8
  <td style="display:none">
9
    [% IF orphaned || AUTH.assert('assembly_edit', 1) %]
9 10
      [% L.hidden_tag("assembly_items[+].parts_id", ITEM.part.id) %]
10
      [% END %]
11
    </td>
12
    <td align="center" [% UNLESS orphaned || AUTH.assert('assembly_edit', 1) %]style='display:none'[% END %]>
13
      [%- L.button_tag("kivi.Part.delete_item_row(this)",
14
                       LxERP.t8("X")) %] [% # , confirm=LxERP.t8("Are you sure?")) %]
15
    </td>
16
    <td>
17
      <div name="position" class="numeric">
18
        [% HTML.escape(position) or HTML.escape(ITEM.position) %]
19
      </div>
20
    </td>
21
    <td align="center" [% UNLESS orphaned || AUTH.assert('assembly_edit', 1) %]style='display:none'[% END %]>
22
      <img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]" class="dragdrop">
23
    </td>
24
    <td nowrap>
25
       [% ITEM.part.presenter.part %]
26
    </td>
27
    <td nowrap>
28
       [% P.part.type_abbreviation(ITEM.part.part_type) %][% P.classification_abbreviation(ITEM.part.classification_id) %]
29
    </td>
30
    <td>
31
       [% HTML.escape(ITEM.part.description) %]
32
    </td>
33
    <td>
11
    [% END %]
12
  </td>
13
  <td[% UNLESS orphaned || AUTH.assert('assembly_edit', 1) %] style="display:none"[% END %]>
14
    [% L.button_tag("kivi.Part.delete_item_row(this)", LxERP.t8("X"), class="wi-verytiny") %] [% # , confirm=LxERP.t8("Are you sure?")) %]
15
  </td>
16
  <td class="numeric">
17
    <div id="position" class="numeric">[% HTML.escape(position) or HTML.escape(ITEM.position) %]</div>
18
  </td>
19
  <td class="center"[% UNLESS orphaned || AUTH.assert('assembly_edit', 1) %] style="display:none"[% END %]>
20
    <img src="image/updown.png" alt="[% LxERP.t8('reorder item') %]" class="dragdrop">
21
  </td>
22
  <td>[% ITEM.part.presenter.part %]</td>
23
  <td>[% P.part.type_abbreviation(ITEM.part.part_type) %][% P.classification_abbreviation(ITEM.part.classification_id) %]</td>
24
  <td>[% HTML.escape(ITEM.part.description) %]</td>
25
  <td class="numeric">
34 26
    [% IF orphaned || AUTH.assert('assembly_edit', 1) %]
35
      [%- L.input_tag("assembly_items[].qty_as_number",
27
      [% L.input_tag("assembly_items[].qty_as_number",
36 28
                      ITEM.qty_as_number,
37 29
                      size = 10,
38 30
                      class="recalc reformat_number numeric") %]
39 31
    [% ELSE %]
40
      [% ITEM.qty_as_number | html %]
41
    [% END %]
42
    </td>
43
    <td nowrap>
44
      [% ITEM.part.unit | html %]
45
    </td>
46
    [% IF orphaned || AUTH.assert('assembly_edit', 1) %]
47
    <td>[% L.checkbox_tag("assembly_items[].bom", checked=ITEM.bom, for_submit=1) %]</td>
48
    [% ELSE %]
49
    <td>[% IF ITEM.bom %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %]</td>
32
      <span class="data">[% ITEM.qty_as_number | html %]</span>
50 33
    [% END %]
51
    <td align="right">
52
      [%- L.div_tag(LxERP.format_amount(ITEM.linetotal_sellprice, 3, 0), name="linetotal") %]
53
      </td>
54
    <td align="right">
55
      [% ITEM.part.sellprice_as_number %]
56
      </td>
57
    <td align="right">
58
      [% ITEM.part.lastcost_as_number %]
59
      </td>
60
    <td align="right">
61
      [% HTML.escape(ITEM.part.partsgroup.partsgroup) %]
62
      </td>
63
  </tr>
34
  </td>
35
  <td>[% ITEM.part.unit | html %]</td>
36
  [% IF orphaned || AUTH.assert('assembly_edit', 1) %]
37
    <td class="center">[% L.checkbox_tag("assembly_items[].bom", checked=ITEM.bom, for_submit=1) %]</td>
38
  [% ELSE %]
39
    <td class="center">[% IF ITEM.bom %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %]</td>
40
  [% END %]
41
  <td class="right">[% L.div_tag(LxERP.format_amount(ITEM.linetotal_sellprice, 3, 0), name="linetotal") %]</td>
42
  <td class="right">[% ITEM.part.sellprice_as_number %]</td>
43
  <td class="right">[% ITEM.part.lastcost_as_number %]</td>
44
  <td>[% HTML.escape(ITEM.part.partsgroup.partsgroup) %]</td>
45
</tr>

Auch abrufbar als: Unified diff