delete.html.twig 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.hasRoute('edit') and admin.isGranted('EDIT')%}
  12. <li class="sonata-action-element"><a href="{{ admin.generateObjectUrl('edit', object) }}">{% trans from 'SonataAdminBundle' %}link_action_edit{% endtrans %}</a></li>
  13. {% endif %}
  14. {% if admin.hasRoute('create') and admin.isGranted('CREATE')%}
  15. <li class="sonata-action-element"><a href="{{ admin.generateUrl('create') }}">{% trans from 'SonataAdminBundle' %}link_action_create{% endtrans %}</a></li>
  16. {% endif %}
  17. </ul>
  18. </div>
  19. {% endblock %}
  20. {% block side_menu %}{{ knp_menu_render(admin.sidemenu(action), {}, 'list') }}{% endblock %}
  21. {% block content %}
  22. <div class="sonata-ba-delete">
  23. <h1>{% trans from 'SonataAdminBundle' %}title_delete{% endtrans %}</h1>
  24. {% trans with {'%object%': object} from 'SonataAdminBundle' %}message_delete_confirmation{% endtrans %}
  25. <form method="POST" action="{{ admin.generateObjectUrl('delete', object) }}">
  26. <input type="hidden" value="DELETE" name="_method" />
  27. <input type="submit" value="{% trans from 'SonataAdminBundle' %}btn_delete{% endtrans %}" />
  28. </form>
  29. </div>
  30. {% endblock %}