{% load django_tables2 %}
{% load i18n static %}
    <div class="rows">
        {% if table.title is not None %}
            <div class="rows">
                <h3>
                    {{ table.title }}
                </h3>
            </div>
        {% endif %}
        <div class="column large-2">
            {% if table.user.is_superuser and table.add_new_entries %}
            <a href="{{ table.add_new_url }}">
                <button class="button small" title="{% trans 'New entry' %}">
                    <i class="fas fa-plus"></i>
                    {% trans 'New' %}
                </button>
            </a>
            {% else %}
                &nbsp;
            {% endif %}
        </div>
        <div class="column large-8">
                &nbsp;
        </div>
        <div class="column large-2 dropdown-area">
            <form method="get">
                {{ table.filter.form.as_p }}
            </form>
            <div class="header-meta-dropdown">
                <button data-dropdown="rpp-choice" aria-controls="rpp-choice" aria-expanded="false" class="custom-dropdown left">{% trans 'Results per page' %}</button>
                <ul id="rpp-choice" class="custom-dropdown-content" data-dropdown-content aria-hidden="true" style="position: absolute; left: -99999px; top: 25px; right: auto;">
                {% for rpp_option in table.results_per_page_choices %}
                    <li class="{% if table.results_per_page_chosen == rpp_option %}selected{% endif %}">
                        <a class="" href="{% querystring table.results_per_page_parameter=rpp_option %}">{{ rpp_option }}</a>
                    </li>
                {% endfor %}
                </ul>
            </div>
        </div>
    </div>
    <div class="row">
        {% render_table table %}
    </div>