You are here

views-ui-expose-filter-form.html.twig in Zircon Profile 8.0

Theme override for exposed filter form.

Available variables:

  • form_description: The exposed filter's description.
  • expose_button: The button to toggle the expose filter form.
  • group_button: Toggle options between single and grouped filters.
  • required: A checkbox to require this filter or not.
  • label: A filter label input field.
  • description: A filter description field.
  • operator: The operators for how the filters value should be treated.
    • #type: The operator type.
  • value: The filters available values.
  • use_operator: Checkbox to allow the user to expose the operator.
  • more: A details element for additional field exposed filter fields.

File

core/themes/stable/templates/admin/views-ui-expose-filter-form.html.twig
View source
  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. {{ form.operator }}
  27. {{ form.value }}
  28. {% if form.use_operator %}
  29. <div class="views-left-40">
  30. {{ form.use_operator }}
  31. </div>
  32. {% endif %}
  33. {#
  34. Collect a list of elements printed to exclude when printing the
  35. remaining elements.
  36. #}
  37. {% set remaining_form = form|without(
  38. 'form_description',
  39. 'expose_button',
  40. 'group_button',
  41. 'required',
  42. 'label',
  43. 'description',
  44. 'operator',
  45. 'value',
  46. 'use_operator',
  47. 'more'
  48. )
  49. %}
  50. {#
  51. Only output the right column markup if there's a left column to begin with.
  52. #}
  53. {% if form.operator['#type'] %}
  54. <div class="views-right-60">
  55. {{ remaining_form }}
  56. </div>
  57. {% else %}
  58. {{ remaining_form }}
  59. {% endif %}
  60. {{ form.more }}