{% extends "modeladmin/index.html" %}
{% load i18n modeladmin_tags wagtailadmin_tags %}

{% block header_extra %}
  <div class="right header-right">
    <div class="col">
      {% include 'wagtailadmin/shared/locale_selector.html' with class='c-dropdown--large' %}
    </div>
    {% if user_can_create %}
      <div class="actionbutton col">
        {% include 'wagtail_localize/modeladmin/includes/button.html' with button=view.button_helper.add_button %}
      </div>
    {% endif %}
    {% if view.list_export %}
      <div class="dropdown dropdown-button match-width col">
        <a href="?export=xlsx&{{ request.GET.urlencode }}" class="button bicolor button--icon">{% icon name="download" wrapped=1 %}{% trans 'Download XLSX' %}</a>
        <div class="dropdown-toggle">{% icon name="arrow-down" %}</div>
        <ul>
          <li><a  class="button bicolor button--icon" href="?export=csv&{{ request.GET.urlencode }}">{% icon name="download" wrapped=1 %}{% trans 'Download CSV' %}</a></li>
        </ul>
      </div>
    {% endif %}
  </div>
{% endblock %}
