123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- {#
- This file is part of the Sonata package.
- (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
- 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 %}
- <div class="box">
- <div class="box-header">
- <h3 class="box-title">{{ group.label|trans({}, group.label_catalogue) }}</h3>
- </div>
- <div class="box-body">
- <table class="table table-hover">
- <tbody>
- {% for admin in group.items %}
- {% if admin.dashboardActions|length > 0 %}
- <tr>
- <td class="sonata-ba-list-label" width="40%">
- {{ label|trans({}, admin.translationdomain) }}
- </td>
- <td>
- <div class="btn-group">
- {% for action in admin.dashboardActions %}
- {% include action.template|default('SonataAdminBundle:CRUD:dashboard__action.html.twig') with {'action': action} %}
- {% endfor %}
- </div>
- </td>
- </tr>
- {% endif %}
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- {% endif %}
- {% endfor %}
- {% endblock %}
|