{% load i18n %}
<div class="col-auto">
  <form method="get">
    <input type="hidden" name="clear_filters" value="1">
    <button class="btn btn-light btn-sm" type="button" data-toggle="modal" data-target="#filter-modal">
      <span class="fa fa-filter"></span>
      {% trans "Filter" %}
      {% if active_filters %}
        <span class="badge badge-primary">
          {{ active_filters|length }}
        </span>
      {% endif %}
    </button>
    {% if active_filters %}
      <button class="btn btn-light btn-sm ml-1" type="submit">
        <span class="fa fa-times"></span>
        {% trans "Clear filters" %}
      </button>
    {% endif %}
  </form>
</div>