{% set base_class = collection.serializer.base_class %}

{% block content %}
    {% block main %}
        <div class="{{ base_class }}">
            {% block form %}
                {% snippet collection.serializer.form_template, collection=collection %}
            {% endblock form %}

            {% block table %}
                <div class="{{ base_class }}--table">
                    {% snippet collection.serializer.table_template, collection=collection %}
                </div>
            {% endblock table %}

            {% block pagination %}
                <div class="{{ base_class }}--pagination">
                    <div class="pagination--size">
                        <span>Rows per page:</span>
                        <select name="{{ collection.name }}:rows_per_page" form="{{ collection.serializer.form_id }}"
                                onchange="this.form.submit()">
                            {% for size in [5, 10, 20, 50] %}
                                <option{% if size == collection.pager.size %} selected{% endif %}>{{ size }}</option>
                            {% endfor %}
                        </select>
                    </div>

                    {% snippet collection.serializer.pager_template, collection=collection %}

                </div>
            {% endblock pagination %}

        </div>

    {% endblock main %}
{% endblock content %}
