{% load i18n %}
<details data-filter-title="{{ title }}" open>
    <summary>
        {% blocktranslate with filter_title=title %} By {{ filter_title }} {% endblocktranslate %}
    </summary>
    <form method="get">
        <ul>
            <li>
                {% with params=choices|last %}
                    <select
                        class="django-admin-list-filter admin-autocomplete"
                        name="{{ params.field_name }}"
                        data-lookup-kwarg="{{ params.lookup_kwarg }}"
                        data-theme="admin-autocomplete"
                    >
                    {% for choice in choices %}
                        {% if choice.display %}<option value="{{ choice.query_string|iriencode }}"{% if choice.selected %} selected{% endif %}>{{ choice.display }}</option>{% endif %}
                    {% endfor %}
                    </select>
                {% endwith %}
            </li>
        </ul>
    </form>
</details>
