Benutzerdef. Variablen f. Waren per Voreinstellung für Belege aktivieren/deaktivieren.
[kivitendo-erp.git] / templates / webpages / custom_variable_config / list.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%][%- INCLUDE 'common/flash.html' %]
2
3 <h1>[% title %]</h1>
4
5 <p>
6  [% 'Custom variables for module' | $T8 %]
7  [%- L.select_tag('module', SELF.modules, value_key='module', title_key='description', default=SELF.module, onchange='show_module_list()') %]
8 </p>
9
10 <p>
11  <table width="100%" id="cvarcfg_list">
12   <thead>
13    <tr class="listheading">
14     <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
15     <th width="20%">[% 'Name' | $T8 %]</th>
16     <th width="20%">[% 'Description' | $T8 %]</th>
17     <th width="20%">[% 'Type' | $T8 %]</th>
18     <th width="20%">[% 'Searchable' | $T8 %]</th>
19     <th width="20%">[% 'Includeable in reports' | $T8 %]</th>
20     [%- IF SELF.module == 'IC' %]
21      <th width="20%">[% 'Editable' | $T8 %]</th>
22      <th width="20%">[% 'Deactivate by default' | $T8 %]</th>
23     [%- END %]
24    </tr>
25   </thead>
26
27   <tbody>
28    [%- FOREACH cfg = CONFIGS %]
29     <tr class="listrow" id="cvarcfg_id_[% cfg.id %]">
30      <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
31
32      <td><a href="[% SELF.url_for(action='edit', module=SELF.module, id=cfg.id) %]">[% HTML.escape(cfg.name) %]</a></td>
33
34      <td>[% HTML.escape(cfg.description) %]</td>
35      <td>[% HTML.escape(SELF.get_translation(cfg.type)) %]</td>
36
37      <td>[%- IF cfg.searchable %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]</td>
38
39      <td>[%- IF cfg.included_by_default %][% 'Yes, included by default' | $T8 %][%- ELSIF cfg.includeable %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]</td>
40
41      [%- IF SELF.module == 'IC' %]
42       <td>[%- IF cfg.flags.match('editable=1') %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]</td>
43       <td>[%- IF cfg.flags.match('defaults_to_invalid=1') %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]</td>
44      [%- END %]
45     </tr>
46     [%- END %]
47   </tbody>
48  </table>
49 </p>
50
51 <hr height="3">
52
53 <p>
54  <a href="[% SELF.url_for(action='new', module=SELF.module) %]">[%- 'Add' | $T8 %]</a>
55 </p>
56
57 [% L.sortable_element('#cvarcfg_list tbody', url=SELF.url_for(action='reorder'), with='cvarcfg_id', params='"&module=" + encodeURIComponent($("#module").val())') %]
58
59 <script type="text/javascript">
60 <!--
61   function show_module_list() {
62     window.location.href = '[% SELF.url_for(action='list') %]&module=' + encodeURIComponent($('#module').val());
63   }
64 -->
65 </script>