2e4209a12e91111b1ca6558348e231631e82df79
[kivitendo-erp.git] / templates / webpages / requirement_spec / _filter.html
1 [%- USE HTML %][%- USE L %][%- USE LxERP %]
2
3 <div class="filter_toggle">
4  <a href="#" onClick="$('.filter_toggle').toggle(); $('#filter_customer_name_substr_ilike').focus();">[% LxERP.t8("Show Filter") %]</a>
5 </div>
6
7 <div class="filter_toggle" style="display:none">
8  <a href="#" onClick="javascript:$('.filter_toggle').toggle()">[% LxERP.t8("Hide Filter") %]</a>
9
10  <form method="post" action="controller.pl" id="search_form">
11   [%- L.hidden_tag("is_template", is_template) %]
12   [%- L.hidden_tag("_include_cvars_from_form", 1) %]
13
14   <p>
15    <table>
16     <tr>
17      <th align="right">[% LxERP.t8("Title") %]</th>
18      <td>[% L.input_tag('filter.title:substr::ilike', filter.title_substr__ilike, class="rs_input_field") %]</td>
19     </tr>
20
21 [%- UNLESS is_template %]
22     <tr>
23      <th align="right">[% LxERP.t8("Customer") %]</th>
24      <td>[% L.input_tag('filter.customer.name:substr::ilike', filter.customer.name_substr__ilike, class="rs_input_field") %]</td>
25     </tr>
26
27     <tr>
28      <th align="right">[% LxERP.t8("Customer Number") %]</th>
29      <td>[% L.input_tag('filter.customer.customernumber:substr::ilike', filter.customer.customernumber_substr__ilike, class="rs_input_field") %]</td>
30     </tr>
31
32     <tr>
33      <th align="right">[% LxERP.t8("Requirement Spec Type") %]</th>
34      <td>[% L.select_tag('filter.type_id', SELF.types, default=filter.type_id, title_key="description", with_empty=1, class="rs_input_field") %]</td>
35     </tr>
36
37     <tr>
38      <th align="right">[% LxERP.t8("Requirement Spec Status") %]</th>
39      <td>[% L.select_tag('filter.status_id[]', SELF.statuses, default=filter.status_id_, title_key="description", multiple=1, class="rs_input_field") %][%# NOTE: the trailing '_' is NOT a mistake -- look at SL::Controller::Helper::Filtered for the explanation! %]</td>
40     </tr>
41
42     <tr>
43      <th align="right">[% LxERP.t8("Project Number") %]</th>
44      <td>[% L.input_tag('filter.project.projectnumber:substr::ilike', filter.project.projectnumber_substr__ilike, class="rs_input_field") %]</td>
45     </tr>
46     <tr>
47      <th align="right">[% LxERP.t8("Project Description") %]</th>
48      <td>[% L.input_tag('filter.project.description:substr::ilike', filter.project.description_substr__ilike, class="rs_input_field") %]</td>
49     </tr>
50
51     [% FOREACH cvar_cfg = SELF.cvar_configs %]
52      [%- IF cvar_cfg.searchable %]
53       <tr>
54        <th align="right">[% HTML.escape(cvar_cfg.description) %]</th>
55        <td>[% INCLUDE 'common/render_cvar_filter_input.html' cvar_cfg=cvar_cfg cvar_class="rs_input_field" %]</td>
56       </tr>
57      [% END %]
58     [% END %]
59
60     [% IF SELF.includeable_cvar_configs.size %]
61      <tr>
62       <th align="right">[% LxERP.t8("Include in Report") %]</th>
63       <td>
64        <table>
65         <tr>
66          [% FOREACH cvar_cfg = SELF.includeable_cvar_configs %]
67           <td>
68            [% name__ = cvar_cfg.name;
69               L.checkbox_tag("include_cvars_" _ name__, value="1", checked=(SELF.include_cvars.$name__ ? 1 : ''), label=cvar_cfg.description) %]
70           </td>
71           [%- IF !loop.last && ((loop.count % 3) == 0) %]
72            </tr><tr>
73           [% END %]
74          [% END %]
75         </tr>
76        </table>
77       </td>
78      </tr>
79     [% END %]
80 [%- END %]
81    </table>
82   </p>
83  </form>
84 </div>