{# This file is part of the Sonata package. (c) Thomas Rabaix For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends sonata_block.templates.block_base %} {% set translation_domain = settings.translation_domain ?? admin.translationDomain %} {% block block %} {% set inlineAnchor = settings.text|replace({'.':'_'}) %} {% set results_count = admin.datagrid.pager.countResults %}
{{ sonata_block_render_event('sonata.admin.list.table.top', { 'admin': admin }) }} {% block list_header %}{% endblock %} {% if results_count > 0 %} {% block table_header %} {% for field_description in admin.list.getElements() %} {% if field_description.name == constant('Sonata\\AdminBundle\\Datagrid\\ListMapper::NAME_SELECT') %} {% else %} {% apply spaceless %} {% endapply %} {% endif %} {% endfor %} {% endblock %} {% block table_body %} {% include get_admin_template('outer_list_rows_' ~ admin.getListMode(), admin.code) %} {% endblock %} {% block table_footer %} {% endblock %}
{% if field_description.option('label_icon') %} {{ field_description.option('label_icon')|parse_icon }} {% endif %} {% if field_description.translationDomain is same as(false) %} {{ field_description.label }} {% else %} {{ field_description.label|trans({}, field_description.translationDomain) }} {% endif %}
{% else %} {% block no_result_content %}
{{ 'no_result'|trans({}, 'SonataAdminBundle') }}
{% endblock %} {% endif %} {{ sonata_block_render_event('sonata.admin.list.table.bottom', { 'admin': admin }) }}
{% endblock %}