/
delete.html.twig
47 lines (33 loc) · 1.7 KB
/
delete.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends base_template %}
{% block actions %}
<div class="sonata-actions btn-group">
{% include 'SonataAdminBundle:Button:edit_button.html.twig' %}
{% include 'SonataAdminBundle:Button:create_button.html.twig' %}
</div>
{% endblock %}
{% block side_menu %}{{ knp_menu_render(admin.sidemenu(action), {'currentClass' : 'active'}, 'list') }}{% endblock %}
{% block content %}
<div class="sonata-ba-delete">
<h1>{{ 'title_delete'|trans({}, 'SonataAdminBundle') }}</h1>
{{ 'message_delete_confirmation'|trans({'%object%': admin.toString(object)}, 'SonataAdminBundle') }}
<div class="well form-actions">
<form method="POST" action="{{ admin.generateObjectUrl('delete', object) }}">
<input type="hidden" name="_method" value="DELETE" />
<input type="hidden" name="_sonata_csrf_token" value="{{ csrf_token }}" />
<input type="submit" class="btn btn-danger" value="{{ 'btn_delete'|trans({}, 'SonataAdminBundle') }}" />
{% if admin.hasRoute('edit') and admin.isGranted('EDIT', object) %}
{{ 'delete_or'|trans({}, 'SonataAdminBundle') }}
<a class="btn btn-success" href="{{ admin.generateObjectUrl('edit', object) }}">
<i class="icon-edit"></i>
{{ 'link_action_edit'|trans({}, 'SonataAdminBundle') }}</a>
{% endif %}
</form>
</div>
</div>
{% endblock %}