action.html.twig 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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 actions %}
  9. <div class="sonata-actions">
  10. <ul>
  11. {% if admin.isGranted('CREATE')%}
  12. <li class="sonata-action-element"><a href="{{ admin.generateUrl('create') }}">{% trans from 'SonataAdminBundle' %}link_action_create{% endtrans %}</a></li>
  13. {% endif %}
  14. {% if admin.isGranted('LIST')%}
  15. <li class="sonata-action-element"><a href="{{ admin.generateUrl('list') }}">{% trans from 'SonataAdminBundle' %}link_action_list{% endtrans %}</a></li>
  16. {% endif %}
  17. </ul>
  18. </div>
  19. {% endblock %}
  20. {% block side_menu %}{% if action is defined %}{{ admin.sidemenu(action).render|raw }}{% endif %}{% endblock %}
  21. {% block content %}
  22. Redefine the content block in your action template
  23. {% endblock %}