]> wagnertech.de Git - mfinanz.git/blob - templates/webpages/custom_variable_config/list.html
restart apache2 in postinst
[mfinanz.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 [%- IF SELF.module == 'IC' %]
11   [%- SET W="10.5%" %]
12 [%- ELSE %]
13   [%- SET W="20%" %]
14 [%- END %]
15 <p>
16  <table width="100%" id="cvarcfg_list">
17   <thead>
18    <tr class="listheading">
19     <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
20     <th width="[%- W -%]">[% 'Name' | $T8 %]</th>
21     <th width="[%- W -%]">[% 'Description' | $T8 %]</th>
22     <th width="[%- W -%]">[% 'Type' | $T8 %]</th>
23     <th width="[%- W -%]">[% 'Searchable' | $T8 %]</th>
24     <th width="[%- W -%]">[% 'Includeable in reports' | $T8 %]</th>
25     [%- IF SELF.module == 'IC' %]
26      <th width="[%- W -%]">[% 'Editable' | $T8 %]</th>
27      <th width="[%- W -%]">[% 'Deactivate by default' | $T8 %]</th>
28      <th width="[%- W -%]">[% 'Filter by Partsgroups' | $T8 %]</th>
29      <th width="[%- W -%]">[% 'Display in basic data tab' | $T8 %]</th>
30     [%- END %]
31    </tr>
32   </thead>
33
34   <tbody>
35    [%- FOREACH cfg = CONFIGS %]
36     <tr class="listrow" id="cvarcfg_id_[% cfg.id %]">
37      <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
38
39      <td><a href="[% SELF.url_for(action='edit', module=SELF.module, id=cfg.id) %]">[% HTML.escape(cfg.name) %]</a></td>
40
41      <td>[% HTML.escape(cfg.description) %]</td>
42      <td>[% HTML.escape(SELF.get_translation(cfg.type)) %]</td>
43
44      <td>[%- IF cfg.searchable %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]</td>
45
46      <td>[%- IF cfg.included_by_default %][% 'Yes, included by default' | $T8 %][%- ELSIF cfg.includeable %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]</td>
47
48      [%- IF SELF.module == 'IC' %]
49       <td>[%- IF cfg.flags.match('editable=1') %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]</td>
50       <td>[%- IF cfg.flags.match('defaults_to_invalid=1') %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]</td>
51       <td>[%- IF cfg.flags.match('partsgroup_filter=1') %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]</td>
52       <td>[% IF cfg.first_tab %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %]</td>
53      [%- END %]
54     </tr>
55     [%- END %]
56   </tbody>
57  </table>
58 </p>
59
60 [% L.sortable_element('#cvarcfg_list tbody', url=SELF.url_for(action='reorder'), with='cvarcfg_id', params='"&module=" + encodeURIComponent($("#module").val())') %]
61
62 <script type="text/javascript">
63 <!--
64   function show_module_list() {
65     window.location.href = '[% SELF.url_for(action='list') %]&module=' + encodeURIComponent($('#module').val());
66   }
67 -->
68 </script>