From 24382df1d9db47fe879e92dfc492e814662d1586 Mon Sep 17 00:00:00 2001 From: Aymeric SERRA Date: Wed, 8 Feb 2023 19:21:56 +0100 Subject: [PATCH] =?UTF-8?q?Boutons=20modifier=20et=20supprimer=20disparais?= =?UTF-8?q?sent=20si=20pas=20connect=C3=A9=20pour=20question=2011?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/atelier/index.html.twig | 11 ++++++++--- templates/atelier/show.html.twig | 4 ++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/templates/atelier/index.html.twig b/templates/atelier/index.html.twig index 9a4449b..6915971 100644 --- a/templates/atelier/index.html.twig +++ b/templates/atelier/index.html.twig @@ -21,11 +21,16 @@ {{ atelier.nom }} {{ atelier.description | raw }} -
+
Afficher - Modifier + {% if app.user and app.user == atelier.instructeur %} + Modifier + {% else %} + + {% endif %}
diff --git a/templates/atelier/show.html.twig b/templates/atelier/show.html.twig index 0d00f2c..70fdad9 100644 --- a/templates/atelier/show.html.twig +++ b/templates/atelier/show.html.twig @@ -27,9 +27,13 @@
+ {% if app.user and app.user == atelier.instructeur %} Modifier + {% endif %} Retour à la liste + {% if app.user and app.user == atelier.instructeur %} {{ include('atelier/_delete_form.html.twig') }} + {% endif %}
{% endblock %}