{% load i18n %}
{% if form %}
  <details {% if filters %}open{% endif %}>
    <summary>{% translate "Filters" %}</summary>
    <form class="filter" method="get">
      {% for field in form %}
        <div class="field">
          <label>{{ field.label }}</label>
          {{ field }}
        </div>
      {% endfor %}
      <div class="buttons">
        <input type="submit" value="{% translate "Filter" %}">
        <input type="reset" value="{% translate "Reset" %}">
        {% if filters %}
          <a href="?" class="del">{% translate "Clear" %}</a>
        {% endif %}
      </div>
    </form>
  </details>
{% endif %}
