dashboard.html.twig 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 base_template %}
  8. {% block title %}{% trans from 'SonataAdminBundle' %}title_dashboard{% endtrans %}{% endblock%}
  9. {% block breadcrumb %}{% endblock %}
  10. {% block content %}
  11. <div class="span7">
  12. {% for group in groups %}
  13. <table class="zebra-striped sonata-ba-list bordered-table">
  14. <thead>
  15. <tr>
  16. <th colspan="3">{{ group.label|trans({}, 'SonataAdminBundle') }}</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. {% for admin in group.items %}
  21. {% if admin.hasroute('create') and admin.isGranted('CREATE') or admin.hasroute('list') and admin.isGranted('LIST') %}
  22. <tr>
  23. <td class="sonata-ba-list-label">{{ admin.label|trans({}, admin.translationdomain) }}</td>
  24. <td>
  25. {% if admin.hasroute('create') and admin.isGranted('CREATE') %}
  26. <a href="{{ admin.generateUrl('create')}}">
  27. <img src="{{ asset('bundles/sonataadmin/famfamfam/add.png') }}" alt="{%- trans from 'SonataAdminBundle' %}link_add{% endtrans -%}" />
  28. {%- trans from 'SonataAdminBundle' %}link_add{% endtrans -%}
  29. </a>
  30. {% endif %}
  31. </td>
  32. <td>
  33. {% if admin.hasroute('list') and admin.isGranted('LIST') %}
  34. <a href="{{ admin.generateUrl('list')}}">
  35. <img src="{{ asset('bundles/sonataadmin/famfamfam/application_view_list.png') }}" alt="{%- trans from 'SonataAdminBundle' %}link_list{% endtrans -%}" />
  36. {%- trans from 'SonataAdminBundle' %}link_list{% endtrans -%}
  37. </a>
  38. {% endif %}
  39. </td>
  40. </tr>
  41. {% endif %}
  42. {% endfor %}
  43. </tbody>
  44. </table>
  45. {% endfor %}
  46. </div>
  47. {% endblock %}