{% extends "admin/change_list.html" %}

{% load i18n admin_urls static admin_list %}

{% block filters %}
    {% if cl.has_filters %}
        <div id="changelist-filter">
            <h2>
                {% translate 'Filter' %}
            </h2>
            {% if cl.is_facets_optional or cl.has_active_filters %}
                <div id="changelist-filter-extra-actions">
                    {% if cl.is_facets_optional %}
                        <div>
                            {% if cl.add_facets %}
                                <a href="{{ cl.remove_facet_link }}" class="hidelink">
                                    {% translate "Hide counts" %}
                                </a>
                            {% else %}
                                <a href="{{ cl.add_facet_link }}" class="viewlink">
                                    {% translate "Show counts" %}
                                </a>
                            {% endif %}
                        </div>
                    {% endif %}
                    {% if cl.has_active_filters %}
                        <div>
                            <a href="{{ cl.clear_all_filters_qs }}">&#10006; {% translate "Clear all filters" %}</a>
                        </div>
                    {% endif %}
                </div>
            {% endif %}
            {% for spec in cl.filter_specs %}
                {% admin_list_filter cl spec %}
            {% endfor %}
        </div>
    {% endif %}
{% endblock %}
