a23b6e22dea81d3ca1093e0acf6fbdfe596c65ac
[yaffs-website] / templates / admin / views-ui-expose-filter-form.html.twig
1 {#
2 /**
3  * @file
4  * Theme override for exposed filter form.
5  *
6  * Available variables:
7  * - form_description: The exposed filter's description.
8  * - expose_button: The button to toggle the expose filter form.
9  * - group_button: Toggle options between single and grouped filters.
10  * - required: A checkbox to require this filter or not.
11  * - label: A filter label input field.
12  * - description: A filter description field.
13  * - operator: The operators for how the filters value should be treated.
14  *   - #type: The operator type.
15  * - value: The filters available values.
16  * - use_operator: Checkbox to allow the user to expose the operator.
17  * - more: A details element for additional field exposed filter fields.
18  */
19 #}
20 {{ form.form_description }}
21 {{ form.expose_button }}
22 {{ form.group_button }}
23 {{ form.required }}
24 {{ form.label }}
25 {{ form.description }}
26
27 {{ form.operator }}
28 {{ form.value }}
29
30 {% if form.use_operator %}
31   <div class="views-left-40">
32   {{ form.use_operator }}
33   </div>
34 {% endif %}
35
36 {#
37   Collect a list of elements printed to exclude when printing the
38   remaining elements.
39 #}
40 {% set remaining_form = form|without(
41   'form_description',
42   'expose_button',
43   'group_button',
44   'required',
45   'label',
46   'description',
47   'operator',
48   'value',
49   'use_operator',
50   'more'
51   )
52 %}
53
54 {#
55   Only output the right column markup if there's a left column to begin with.
56 #}
57 {% if form.operator['#type'] %}
58   <div class="views-right-60">
59   {{ remaining_form }}
60   </div>
61 {% else %}
62   {{ remaining_form }}
63 {% endif %}
64
65 {{ form.more }}