{# 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 %} {% block block %} {% for group in groups %} {% set display = group.roles is empty or is_granted(sonata_config.getOption('role_super_admin')) or group.roles|filter(role => is_granted(role))|length > 0 %} {% if display %}

{# NEXT_MAJOR: Remove the default null #} {% if group.translation_domain|default(null) is same as(false) %} {{ group.label }} {% else %} {# NEXT_MAJOR: Remove the fallback on group.label_catalogue #} {{ group.label|trans({}, group.translation_domain|default(group.label_catalogue)) }} {% endif %}

{% for admin in group.items %} {% if admin.dashboardActions|length > 0 %} {% endif %} {% endfor %}
{% if admin.label is not empty %} {{ admin.label|trans({}, admin.translationdomain) }} {% endif %}
{% for action in admin.dashboardActions %} {% include action.template|default('@SonataAdmin/CRUD/dashboard__action.html.twig') with {'action': action} %} {% endfor %}
{% endif %} {% endfor %} {% endblock %}