{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #} {# @var entities \EasyCorp\Bundle\EasyAdminBundle\Collection\EntityDtoCollection #} {# @var paginator \EasyCorp\Bundle\EasyAdminBundle\Orm\EntityPaginator #} {% extends ea.templatePath('layout') %} {% trans_default_domain ea.i18n.translationDomain %} {% block body_id entities|length > 0 ? 'ea-index-' ~ entities|first.name : '' %} {% block body_class 'index' ~ (entities|length > 0 ? ' index-' ~ entities|first.name : '') %} {% block content_title %} {{ 'sort'|lc_trans_admin_title(ea.getEntity().getFqcn()) }} {% endblock %} {% block content_breadcrumb %} {{ include('@LcSov/adminlte/block/breadcrumb.html.twig') }} {% endblock content_breadcrumb %} {% set has_batch_actions = batch_actions|length > 0 %} {% block page_actions %}{% endblock page_actions %} {% block main %} {# sort can be multiple; let's consider the sorting field the first one #} {% set sort_field_name = app.request.get('sort')|keys|first %} {% set sort_order = app.request.get('sort')|first %} {% set some_results_are_hidden = false %} {% set has_footer = entities|length != 0 %} {% set has_search = ea.crud.isSearchEnabled %} {% set has_filters = filters|length > 0 %} {% set has_datagrid_tools = has_search or has_filters %} {{ form_start(sortable_form) }} {% embed '@LcSov/adminlte/embed/card.html.twig' %} {% block css %}card-table card-outline card-primary{% endblock %} {% block header %} {{ paginator.numResults }} résultats
Retour à la liste
{% endblock %} {% block body %}
{% block table_head %} {% for field in fields ?? [] %} {% set field = field.getAsDto() %} {% if field.isDisplayedOn('index') %} {% set is_sorting_field = ea.search.isSortingField(field.property) %} {% endif %} {% endfor %} {% endblock table_head %} {% block table_body %} {% for entity in entities %} {% if not entity.isAccessible %} {% set some_results_are_hidden = true %} {% else %} {% for field in entity.fields %} {% if field.isDisplayedOn('index') %} {% endif %} {% endfor %} {% endif %} {% else %} {% endfor %} {% if some_results_are_hidden %} {% endif %} {% endblock table_body %}
{{ field.label ? field.label|raw : field.getProperty|raw }}
{{ include(field.templatePath, { field: field, entity: entity }, with_context = false) }}
{{ 'datagrid.no_results'|trans(ea.i18n.translationParameters, 'EasyAdminBundle') }}
{{ 'datagrid.hidden_results'|trans({}, 'EasyAdminBundle') }}
{{ form_row(sortable_form.entities) }} {{ form_rest(sortable_form) }}
{% endblock %} {% block footer %}
{# {{ _action.label is defined and not _action.label is empty ? _action.label|trans(_trans_parameters) }} #}
{% endblock %} {% endembed %} {{ form_end(sortable_form) }} {% endblock main %}