{# 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('ROLE_SUPER_ADMIN') ) %} {% for role in group.roles if not display %} {% set display = is_granted(role)%} {% endfor %} {% if display %} {% for admin in group.items %} {% if admin.hasroute('create') and admin.isGranted('CREATE') or admin.hasroute('list') and admin.isGranted('LIST') %} {% endif %} {% endfor %} {% endif %} {% endfor %}
{{ group.label|trans({}, group.label_catalogue) }}
{{ admin.label|trans({}, admin.translationdomain) }}
{% if admin.hasroute('create') and admin.isGranted('CREATE') %} {% if admin.subClasses is empty %} {% trans from 'SonataAdminBundle' %}link_add{% endtrans %} {% else %} {% trans from 'SonataAdminBundle' %}link_add{% endtrans %} {% endif %} {% endif %} {% if admin.hasroute('list') and admin.isGranted('LIST') %} {% trans from 'SonataAdminBundle' %}link_list{% endtrans -%} {% endif %}
{% endblock %}