vendor/sonata-project/admin-bundle/src/Resources/views/Block/block_admin_list.html.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of the Sonata package.
  3. (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {% extends sonata_block.templates.block_base %}
  8. {% block block %}
  9.     {% for group in groups %}
  10.         {% 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 %}
  11.         {% if display %}
  12.             <div class="box">
  13.                 <div class="box-header">
  14.                     <h3 class="box-title">
  15.                         {# NEXT_MAJOR: Remove the default null #}
  16.                         {% if group.translation_domain|default(null) is same as(false) %}
  17.                             {{ group.label }}
  18.                         {% else %}
  19.                             {# NEXT_MAJOR: Remove the fallback on group.label_catalogue #}
  20.                             {{ group.label|trans({}, group.translation_domain|default(group.label_catalogue)) }}
  21.                         {% endif %}
  22.                     </h3>
  23.                 </div>
  24.                 <div class="box-body">
  25.                     <table class="table table-hover">
  26.                         <tbody>
  27.                             {% for admin in group.items %}
  28.                                 {% if admin.dashboardActions|length > 0 %}
  29.                                     <tr>
  30.                                         <td class="sonata-ba-list-label" width="40%">
  31.                                             {% if admin.label is not empty %}
  32.                                                 {{ admin.label|trans({}, admin.translationdomain) }}
  33.                                             {% endif %}
  34.                                         </td>
  35.                                         <td>
  36.                                             <div class="btn-group">
  37.                                                 {% for action in admin.dashboardActions %}
  38.                                                     {% include action.template|default('@SonataAdmin/CRUD/dashboard__action.html.twig') with {'action': action} %}
  39.                                                 {% endfor %}
  40.                                             </div>
  41.                                         </td>
  42.                                     </tr>
  43.                                 {% endif %}
  44.                             {% endfor %}
  45.                         </tbody>
  46.                     </table>
  47.                 </div>
  48.             </div>
  49.         {% endif %}
  50.     {% endfor %}
  51. {% endblock %}