Templates werden nicht mehr explizit übersetzt: *_master in * umbenannt
[kivitendo-erp.git] / templates / webpages / amcvar / search_filter.html
1 [%- USE T8 %]
2 [% USE HTML %]
3
4    [%- FOREACH var = variables %]
5    [%- IF var.searchable %]
6    <tr id='cvar_filter_[% var.name %]'>
7     <td align="right" valign="top">[% HTML.escape(var.description) %]</td>
8     <td valign="top">
9
10      [%- IF var.type == 'bool' %]
11      <select name="cvar_[% HTML.escape(var.name) %]">
12       <option value="">---</option>
13       <option value="yes">[% 'Yes' | $T8 %]</option>
14       <option value="no">[% 'No' | $T8 %]</option>
15      </select>
16
17      [%- ELSIF var.type == 'date' %]
18      [% 'from (time)' | $T8 %]
19      <input name="cvar_[% HTML.escape(var.name) %]_from" id="cvar_[% HTML.escape(var.name) %]_from" size="12">
20      <input type="button" name="cvar_[% HTML.escape(var.name) %]_from_button" id="cvar_[% HTML.escape(var.name) %]_from_trigger" value="?">
21      [% 'to (time)' | $T8 %]
22      <input name="cvar_[% HTML.escape(var.name) %]_to" id="cvar_[% HTML.escape(var.name) %]_to" size="12">
23      <input type="button" name="cvar_[% HTML.escape(var.name) %]_to_button" id="cvar_[% HTML.escape(var.name) %]_to_trigger" value="?">
24
25      <script type="text/javascript">
26       <!--
27           Calendar.setup({ inputField : "cvar_[% HTML.escape(var.name) %]_from",
28                            ifFormat   :"[% myconfig_jsc_dateformat %]",
29                            align      : "BR",
30                            button     : "cvar_[% HTML.escape(var.name) %]_from_trigger" });
31           Calendar.setup({ inputField : "cvar_[% HTML.escape(var.name) %]_to",
32                            ifFormat   :"[% myconfig_jsc_dateformat %]",
33                            align      : "BR",
34                            button     : "cvar_[% HTML.escape(var.name) %]_to_trigger" });
35         -->
36      </script>
37
38      [%- ELSIF var.type == 'number' %]
39      <select name="cvar_[% HTML.escape(var.name) %]_qtyop">
40       <option selected>==</option>
41       <option>=/=</option>
42       <option>&gt;</option>
43       <option>&gt;=</option>
44       <option>&lt;</option>
45       <option>&lt;=</option>
46      </select>
47      <input name="cvar_[% HTML.escape(var.name) %]"[% IF var.maxlength %]maxlength="[% HTML.escape(var.maxlength) %]"[% END %]>
48
49      [% ELSIF var.type == 'select' %]
50      <select name="cvar_[% HTML.escape(var.name) %]">
51       <option value="" selected>---</option>
52       [%- FOREACH option = var.OPTIONS %]
53       <option>[% HTML.escape(option.value) %]</option>
54       [%- END %]
55      </select>
56
57      [%- ELSE %]
58      <input name="cvar_[% HTML.escape(var.name) %]"[% IF var.maxlength %]maxlength="[% HTML.escape(var.maxlength) %]"[% END %]>
59
60      [%- END %]
61     </td>
62    </tr>
63    [%- END %]
64    [%- END %]
65 [% IF hidden_cvar_filters %]
66    <tr><td></td><td colspan="3"><a href="#" id="cvar_filter-toggle"><i>[% 'click here to edit cvars' | $T8 %]</i></a></td></tr>
67    <script type='text/javascript'>
68      $('#cvar_filter-toggle').click(function() { $('[id^="cvar_filter"]').toggle(); $('[id^="l_cvartd_"]').toggle(); });
69      $(document).ready(function(){ $('[id^="cvar_filter_"]').hide(); $('[id^="l_cvartd_"]').hide(); });
70    </script>
71 [% END %]