dashboard.html.twig 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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">
  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. <tr>
  22. <td class="sonata-ba-list-label">{{ admin.label|trans({}, admin.translationdomain) }}</td>
  23. <td>
  24. {% if admin.hasroute('create') and admin.isGranted('CREATE') %}
  25. <a href="{{ admin.generateUrl('create')}}">
  26. <img src="{{ asset('bundles/sonataadmin/famfamfam/add.png') }}" alt="{%- trans from 'SonataAdminBundle' %}link_add{% endtrans -%}" />
  27. {%- trans from 'SonataAdminBundle' %}link_add{% endtrans -%}
  28. </a>
  29. {% endif %}
  30. </td>
  31. <td>
  32. {% if admin.hasroute('list') and admin.isGranted('LIST') %}
  33. <a href="{{ admin.generateUrl('list')}}">
  34. <img src="{{ asset('bundles/sonataadmin/famfamfam/application_view_list.png') }}" alt="{%- trans from 'SonataAdminBundle' %}link_list{% endtrans -%}" />
  35. {%- trans from 'SonataAdminBundle' %}link_list{% endtrans -%}
  36. </a>
  37. {% endif %}
  38. </td>
  39. </tr>
  40. {% endfor %}
  41. </tbody>
  42. </table>
  43. {% endfor %}
  44. </div>
  45. {% endblock %}