{% block index_header %}
<h1>{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}</h1>
{% endblock index_header %}

{% block filter_order %}
    {% if filter_order is not null %}
        {{ filter_order|chill_render_filter_order_helper }}
    {% endif %}
{% endblock %}

{% if entities|length == 0 %}
    {% block no_existing_entities %}
    <p>{{ no_existing_entities_sentences|default('No entities')|trans }}</p>
    {% endblock %}
{% else %}
    {% block table_entities %}
    <table class="table table-bordered border-dark align-middle">
        <thead>
            <tr>
                {% block table_entities_thead_tr %}
                <th>id</th>
                {% endblock %}
            </tr>
        </thead>
        <tbody>
            {% block table_entities_tbody %}
            {% for entity in entities %}
                <tr>
                    <td>{{ entity.id }}</td>
                </tr>
            {% endfor %}
            {% endblock %}
        </tbody>
    </table>
    {% endblock %}

{% endif %}

{% block pagination %}
    <div class="crud_index__pagination">
        {{ chill_pagination(paginator) }}
    </div>
{% endblock %}

{% block list_actions %}
    <ul class="record_actions sticky-form-buttons">
        {% block actions_before %}{% endblock %}
        {% block add_new %}
            <li>
                <a href="{{ chill_path_add_return_path('chill_crud_' ~ crud_name ~ '_new') }}" class="btn btn-new">{{ ('crud.'~crud_name~'.index.add_new')|trans( {'%crud_name%': crud_name} ) }}</a>
            </li>
        {% endblock %}
    </ul>
{% endblock list_actions %}
