delete.html.twig 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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="btn-group btn-group-justified sonata-actions">
  10. {% include 'SonataAdminBundle:Button:list_button.html.twig' %}
  11. {% include 'SonataAdminBundle:Button:edit_button.html.twig' %}
  12. {% include 'SonataAdminBundle:Button:create_button.html.twig' %}
  13. </div>
  14. {% endblock %}
  15. {% block tab_menu %}{{ knp_menu_render(admin.sidemenu(action), {'currentClass' : 'active'}, 'list') }}{% endblock %}
  16. {% block content %}
  17. <div class="sonata-ba-delete">
  18. <h1>{{ 'title_delete'|trans({}, 'SonataAdminBundle') }}</h1>
  19. {{ 'message_delete_confirmation'|trans({'%object%': admin.toString(object)}, 'SonataAdminBundle') }}
  20. <div class="well well-small form-actions">
  21. <form method="POST" action="{{ admin.generateObjectUrl('delete', object) }}">
  22. <input type="hidden" name="_method" value="DELETE">
  23. <input type="hidden" name="_sonata_csrf_token" value="{{ csrf_token }}">
  24. <button type="submit" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i> {{ 'btn_delete'|trans({}, 'SonataAdminBundle') }}</button>
  25. {% if admin.hasRoute('edit') and admin.isGranted('EDIT', object) %}
  26. {{ 'delete_or'|trans({}, 'SonataAdminBundle') }}
  27. <a class="btn btn-success" href="{{ admin.generateObjectUrl('edit', object) }}">
  28. <i class="glyphicon glyphicon-edit"></i>
  29. {{ 'link_action_edit'|trans({}, 'SonataAdminBundle') }}</a>
  30. {% endif %}
  31. </form>
  32. </div>
  33. </div>
  34. {% endblock %}