From f524cde16f1ffaaa7088cf7004997b437e240784 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 13 Dec 2020 21:53:40 +0100 Subject: [PATCH] Contextualize buttons --- Resources/views/session/edit.html.twig | 57 +++++++++++++++----------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/Resources/views/session/edit.html.twig b/Resources/views/session/edit.html.twig index 5751cc9..7059ed9 100644 --- a/Resources/views/session/edit.html.twig +++ b/Resources/views/session/edit.html.twig @@ -5,46 +5,53 @@ {{ session.title }} {{ session.location.at }} - {% if form.modify is defined or form.raincancel is defined %} + {% if form.modify is defined or form.move is defined or form.cancel is defined or form.raincancel is defined or form.forcecancel is defined or is_granted('ROLE_ADMIN') %} {{ form_start(form) }} {% if form.modify is defined %} - {% if is_granted('ROLE_REGULAR') %} -
- {{ form_row(form.begin) }} - - {{ form_row(form.length) }} - - {{ form_row(form.modify) }} -
- {% endif %} - {% if is_granted('ROLE_SENIOR') %} -
- {{ form_row(form.location) }} - - {{ form_row(form.move) }} -
- {% endif %} +
+ {{ form_row(form.begin) }} + + {{ form_row(form.length) }} + + {{ form_row(form.modify) }} +
+ {% endif %} + {% if form.move is defined %} +
+ {{ form_row(form.location) }} + + {{ form_row(form.move) }} +
+ {% endif %} + {% if form.cancel is defined or form.raincancel is defined or form.forcecancel is defined or is_granted('ROLE_ADMIN') %}
{% if is_granted('ROLE_ADMIN') %} {{ form_row(form.user) }} {% endif %} - {{ form_row(form.cancel) }} + {% if form.cancel is defined %} + {{ form_row(form.cancel) }} + {% endif %} + + {% if form.raincancel is defined %} + {{ form_row(form.raincancel) }} + {% endif %} + + {% if form.forcecancel is defined %} + {{ form_row(form.forcecancel) }} + {% endif %} {% if is_granted('ROLE_ADMIN') %} - {{ form_row(form.attribute) }} + {% if form.attribute is defined %} + {{ form_row(form.attribute) }} - {{ form_row(form.autoattribute) }} + {{ form_row(form.autoattribute) }} + {% endif %} {{ form_row(form.lock) }} {% endif %}
- {% elseif form.raincancel is defined %} -
- {{ form_row(form.raincancel) }} -
{% endif %} - {# render csrf token etc .#} {{ form_end(form) }} -- 2.41.1