Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2a97e655

Von Hans Peter Schlaepfer vor etwa 5 Jahren hinzugefügt

  • ID 2a97e655e92b373e1b80526a22686da670777d13
  • Vorgänger 58ca9076
  • Nachfolger f640c021

Neues kivitendo Design Aenderungen in templates/webpages/am/..

Unterschiede anzeigen:

templates/webpages/am/edit_units.html
1 1
[%- USE T8 %][%- USE LxERP %][% USE L %]
2 2
[% USE HTML %]
3
<h1>[% title %]</h1>
3
<h1>
4
  [% title %]
5
</h1>
4 6

  
5 7
[% INCLUDE "common/flash.html" %]
6 8

  
7
[% PROCESS "am/_units_header_info.html" %]
9
<div class="wrapper">
10

  
11
  <div class="col" style="width:30.0em">
12
    [% PROCESS "am/_units_header_info.html" %]
13
  </div>
14

  
15
  <div class="col" style="width:30.0em">
16
    <p>
17
      [% 'Units that have already been used (e.g. for parts and services or in invoices or warehouse transactions) cannot be changed.' | $T8 %]
18
    </p>
19
    <p>
20
      [% 'Units marked for deletion will be deleted upon saving.' | $T8 %]
21
    </p>
22
    <p>
23
      [% 'You can declare different translations for singular and plural for each unit (e.g. &quot;day&quot; and &quot;days).' | $T8 %]
24
    </p>
25
  </div>
26
</div>
27

  
28
<div class="wrapper">
29

  
30
  <form method="post" action="[% HTML.escape(script) %]" id="form">
31
    <input type="hidden" name="type" value="unit">
32

  
33
    <table id="unit_list" class="tbl-list wi-moderate">
34
      <thead>
35
        <tr>
36
          <th class="center img"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
37
          <th>[% 'Delete' | $T8 %]</th>
38
          <th>[% 'Unit' | $T8 %]</th>
39
          <th>[% 'Base unit' | $T8 %]</th>
40
          <th>[% 'Factor' | $T8 %]</th>
41
          [% FOREACH language = LANGUAGES %]
42
          <th>[% language.description %]<br>
43
          [% 'Singular' | $T8 %]</th>
44
          <th><br>
45
          [% 'Plural' | $T8 %]</th>
46
          [% END %]
47
        </tr>
48
      </thead>
49
      <tbody>
50
        [% FOREACH row = UNITS %]
51
        <tr id="unit_id_[% row.id %]">
52
          <td class="center img dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
53
        [% IF row.in_use %]
54
          <td>
55
            <input type="hidden" name="unchangeable_[% loop.count %]" value="1">
56
            <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
57
          </td>
58
          <td><span>[% HTML.escape(row.name) %]</span></td>
59
          <td><span>[% IF row.base_unit %][% HTML.escape(row.base_unit) %][% ELSE %]---[% END %]</span></td>
60
          <td class="numeric"><span>[% IF row.base_unit %][% HTML.escape(row.factor)    %][% ELSE %]---[% END %]</span></td>
61
        [% ELSE %]
62
          <td class="center">
63
            <input type="checkbox" name="delete_[% loop.count %]">
64
          </td>
65
          <td>
66
            <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
67
            <input name="name_[% loop.count %]" value="[% HTML.escape(row.name) %]" maxlength="20" type="text" class="wi-small">
68
          </td>
69
          <td>
70
            <select name="base_unit_[% loop.count %]" class="wi-small">
71
              [% FOREACH option = row.BASE_UNIT_DDBOX %]
72
                <option [% option.selected %]>[% HTML.escape(option.name) %]</option>
73
              [% END %]
74
            </select>
75
          </td>
76
          <td>
77
            <input name="factor_[% loop.count %]" value="[% row.factor %]" maxlength="8" type="text" class="wi-verysmall numeric">
78
          </td>
79
        [% END %]
80
        [% FOREACH language = row.UNITLANGUAGES %]
81
          <td>
82
            <input type="text" name="localized_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized) %]" maxlength="20" class="wi-mediumsmall">
83
          </td>
84
          <td>
85
            <input type="text" name="localized_plural_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized_plural) %]" maxlength="20" class="wi-mediumsmall">
86
          </td>
87
        [% END %]
88
        </tr>
89
        [% END %]
90
      </tbody>
91
    </table>
92

  
93
    <input type="hidden" name="rowcount" value="[% UNITS.size %]">
94

  
95
  </form>
96

  
97
  [% L.sortable_element('#unit_list tbody', url => 'controller.pl?action=Unit/reorder', with => 'unit_id') %]
98
</div>
8 99

  
9
<hr>
10

  
11
<p>
12
 [% 'Units that have already been used (e.g. for parts and services or in invoices or warehouse transactions) cannot be changed.' | $T8 %]
13
</p>
14

  
15
<p>
16
 [% 'Units marked for deletion will be deleted upon saving.' | $T8 %]
17
</p>
18

  
19
<p>
20
 [% 'You can declare different translations for singular and plural for each unit (e.g. &quot;day&quot; and &quot;days).' | $T8 %]
21
</p>
22

  
23
<form method="post" action="[% HTML.escape(script) %]" id="form">
24

  
25
 <input type="hidden" name="type" value="unit">
26

  
27
 <table id="unit_list">
28
  <thead>
29
  <tr class="listheading">
30
   <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
31
   <th>[% 'Delete' | $T8 %]</th>
32
   <th>[% 'Unit' | $T8 %]</th>
33
   <th>[% 'Base unit' | $T8 %]</th>
34
   <th>[% 'Factor' | $T8 %]</th>
35
   [% FOREACH language = LANGUAGES %]
36
    <th>[% language.description %]</th>
37
   [% END %]
38
  </tr>
39
  </thead>
40

  
41
  <tbody>
42
  [% FOREACH row = UNITS %]
43
   <tr class="listrow[% loop.count % 2 %]" id="unit_id_[% row.id %]">
44
    <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
45
    [% IF row.in_use %]
46
     <td>
47
      <input type="hidden" name="unchangeable_[% loop.count %]" value="1">
48
      <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
49
     </td>
50

  
51
     <td>[% HTML.escape(row.name) %]</td>
52
     <td>[% IF row.base_unit %][% HTML.escape(row.base_unit) %][% ELSE %]---[% END %]</td>
53
     <td>[% IF row.base_unit %][% HTML.escape(row.factor) %][% ELSE %]---[% END %]</td>
54

  
55
     [% ELSE %]
56

  
57
     <td align="center"><input type="checkbox" name="delete_[% loop.count %]"></td>
58
     <td>
59
      <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
60
      <input name="name_[% loop.count %]" size="10" maxlength="20" value="[% HTML.escape(row.name) %]">
61
     </td>
62
     <td>
63
      <select name="base_unit_[% loop.count %]">
64
       [% FOREACH option = row.BASE_UNIT_DDBOX %]<option [% option.selected %]>[% HTML.escape(option.name) %]</option>[% END %]
65
      </select>
66
     </td>
67
     <td><input name="factor_[% loop.count %]" size="8" value="[% row.factor %]"></td>
68
    [% END %]
69

  
70
    [% FOREACH language = row.UNITLANGUAGES %]
71
     <td>
72
      [% 'singular first char' | $T8 %]:
73
      <input name="localized_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized) %]" size="6" maxlength="20">
74
      [% 'plural first char' | $T8 %]:
75
      <input name="localized_plural_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized_plural) %]" size="6" maxlength="20">
76
     </td>
77
    [% END %]
78
   </tr>
79
  [% END %]
80
  </tbody>
81
 </table>
82

  
83
 <input type="hidden" name="rowcount" value="[% UNITS.size %]">
84

  
85
 </form>
86

  
87
 [% L.sortable_element('#unit_list tbody', url => 'controller.pl?action=Unit/reorder', with => 'unit_id') %]

Auch abrufbar als: Unified diff