8762dd34c90ca69706f6dd5dc5a25cfac8ae5166
[kivitendo-erp.git] / templates / webpages / am / edit_bins.html
1 [%- USE HTML -%][%- USE T8 -%]
2
3 <h1>[% title %]</h1>
4
5 [% UNLESS BINS.size %]
6  <p>[% 'No bins have been added to this warehouse yet.' | $T8 %]</p>
7
8 [% ELSE %]
9
10  <p>
11   [%- 'Bins that have been used in the past cannot be deleted anymore. For these bins there\'s no checkbox in the &quot;Delete&quot; column.' | $T8 %]
12  </p>
13
14  <form method="post" action="am.pl" id="form">
15
16   <input type="hidden" name="warehouse_id" value="[% HTML.escape(id) %]">
17
18   <input type="hidden" name="type" value="bin">
19   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
20
21   <table border="0">
22    <tr>
23     <th class="listheading">[% 'Delete' | $T8 %]</th><th class="listheading">[% 'Description' | $T8 %]</th>
24     <th class="listheading">[% 'Delete' | $T8 %]</th><th class="listheading">[% 'Description' | $T8 %]</th>
25    </tr>
26    [%- SET row_odd = '1' %]
27    [%- USE bin_it = Iterator(BINS) %]
28    [%- FOREACH bin = bin_it %]
29    [%- IF row_odd %]
30    <tr>
31     [%- END %]
32
33     <td>[% IF bin.in_use %]&nbsp;[% ELSE %]<input type="checkbox" name="delete_[% bin_it.count %]" value="1">[% END %]</td>
34     <td>
35      <input type="hidden" name="id_[% bin_it.count %]" value="[% HTML.escape(bin.id) %]">
36      <input name="description_[% bin_it.count %]" value="[% HTML.escape(bin.description) %]">
37     </td>
38
39     [%- SET end_tr = '0' %]
40     [%- UNLESS row_odd %][%- SET end_tr = '1' %][%- END %]
41     [%- IF bin_it.last %][%- SET end_tr = '1' %][%- END %]
42     [%- IF end_tr %]
43    </tr>
44    [%- END %]
45
46    [%- IF row_odd %][% SET row_odd = '0' %][% ELSE %][% SET row_odd = '1' %][% END %]
47    [%- END %]
48   </table>
49
50   <input type="hidden" name="rowcount" value="[% BINS.size %]">
51  </form>
52
53 [% END %]