From: Raphaƫl Gertz Date: Sun, 13 Dec 2020 21:56:41 +0000 (+0100) Subject: Contextualize buttons X-Git-Tag: 0.1.7~44 X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/airbundle/commitdiff_plain/107d18f5dc7543819992386985e45be108d756b5?ds=sidebyside Contextualize buttons --- diff --git a/Resources/views/form/_session_edit.html.twig b/Resources/views/form/_session_edit.html.twig index 3477a53..4c6c368 100644 --- a/Resources/views/form/_session_edit.html.twig +++ b/Resources/views/form/_session_edit.html.twig @@ -1,4 +1,4 @@ -{% if session_edit.modify is defined or session_edit.move is defined or session_edit.cancel is defined or session_edit.raincancel is defined %} +{% if session_edit.modify is defined or session_edit.move is defined or session_edit.cancel is defined or session_edit.raincancel is defined or session_edit.forcecancel is defined or is_granted('ROLE_ADMIN') %}

{% trans %}Modify{% endtrans %}

{{ form_start(session_edit) }} @@ -18,7 +18,7 @@ {{ form_row(session_edit.move) }} {% endif %} - {% if session_edit.cancel is defined or session_edit.raincancel is defined %} + {% if session_edit.cancel is defined or session_edit.raincancel is defined or session_edit.forcecancel is defined or is_granted('ROLE_ADMIN') %}
{% if is_granted('ROLE_ADMIN') %} {{ form_row(session_edit.user) }} @@ -32,11 +32,16 @@ {{ form_row(session_edit.raincancel) }} {% endif %} - {% if is_granted('ROLE_ADMIN') %} + {% if session_edit.forcecancel is defined %} + {{ form_row(session_edit.forcecancel) }} + {% endif %} - {{ form_row(session_edit.attribute) }} + {% if is_granted('ROLE_ADMIN') %} + {% if session_edit.attribute is defined %} + {{ form_row(session_edit.attribute) }} - {{ form_row(session_edit.autoattribute) }} + {{ form_row(session_edit.autoattribute) }} + {% endif %} {{ form_row(session_edit.lock) }} {% endif %}