Templates werden nicht mehr explizit übersetzt: *_master in * umbenannt
[kivitendo-erp.git] / templates / webpages / amcvar / search_filter.html
diff --git a/templates/webpages/amcvar/search_filter.html b/templates/webpages/amcvar/search_filter.html
new file mode 100644 (file)
index 0000000..0bf105e
--- /dev/null
@@ -0,0 +1,71 @@
+[%- USE T8 %]
+[% USE HTML %]
+
+   [%- FOREACH var = variables %]
+   [%- IF var.searchable %]
+   <tr id='cvar_filter_[% var.name %]'>
+    <td align="right" valign="top">[% HTML.escape(var.description) %]</td>
+    <td valign="top">
+
+     [%- IF var.type == 'bool' %]
+     <select name="cvar_[% HTML.escape(var.name) %]">
+      <option value="">---</option>
+      <option value="yes">[% 'Yes' | $T8 %]</option>
+      <option value="no">[% 'No' | $T8 %]</option>
+     </select>
+
+     [%- ELSIF var.type == 'date' %]
+     [% 'from (time)' | $T8 %]
+     <input name="cvar_[% HTML.escape(var.name) %]_from" id="cvar_[% HTML.escape(var.name) %]_from" size="12">
+     <input type="button" name="cvar_[% HTML.escape(var.name) %]_from_button" id="cvar_[% HTML.escape(var.name) %]_from_trigger" value="?">
+     [% 'to (time)' | $T8 %]
+     <input name="cvar_[% HTML.escape(var.name) %]_to" id="cvar_[% HTML.escape(var.name) %]_to" size="12">
+     <input type="button" name="cvar_[% HTML.escape(var.name) %]_to_button" id="cvar_[% HTML.escape(var.name) %]_to_trigger" value="?">
+
+     <script type="text/javascript">
+      <!--
+          Calendar.setup({ inputField : "cvar_[% HTML.escape(var.name) %]_from",
+                           ifFormat   :"[% myconfig_jsc_dateformat %]",
+                           align      : "BR",
+                           button     : "cvar_[% HTML.escape(var.name) %]_from_trigger" });
+          Calendar.setup({ inputField : "cvar_[% HTML.escape(var.name) %]_to",
+                           ifFormat   :"[% myconfig_jsc_dateformat %]",
+                           align      : "BR",
+                           button     : "cvar_[% HTML.escape(var.name) %]_to_trigger" });
+        -->
+     </script>
+
+     [%- ELSIF var.type == 'number' %]
+     <select name="cvar_[% HTML.escape(var.name) %]_qtyop">
+      <option selected>==</option>
+      <option>=/=</option>
+      <option>&gt;</option>
+      <option>&gt;=</option>
+      <option>&lt;</option>
+      <option>&lt;=</option>
+     </select>
+     <input name="cvar_[% HTML.escape(var.name) %]"[% IF var.maxlength %]maxlength="[% HTML.escape(var.maxlength) %]"[% END %]>
+
+     [% ELSIF var.type == 'select' %]
+     <select name="cvar_[% HTML.escape(var.name) %]">
+      <option value="" selected>---</option>
+      [%- FOREACH option = var.OPTIONS %]
+      <option>[% HTML.escape(option.value) %]</option>
+      [%- END %]
+     </select>
+
+     [%- ELSE %]
+     <input name="cvar_[% HTML.escape(var.name) %]"[% IF var.maxlength %]maxlength="[% HTML.escape(var.maxlength) %]"[% END %]>
+
+     [%- END %]
+    </td>
+   </tr>
+   [%- END %]
+   [%- END %]
+[% IF hidden_cvar_filters %]
+   <tr><td></td><td colspan="3"><a href="#" id="cvar_filter-toggle"><i>[% 'click here to edit cvars' | $T8 %]</i></a></td></tr>
+   <script type='text/javascript'>
+     $('#cvar_filter-toggle').click(function() { $('[id^="cvar_filter"]').toggle(); $('[id^="l_cvartd_"]').toggle(); });
+     $(document).ready(function(){ $('[id^="cvar_filter_"]').hide(); $('[id^="l_cvartd_"]').hide(); });
+   </script>
+[% END %]