From 3d22fc5e03ade570aed5456e7110f7d01ccbc469 Mon Sep 17 00:00:00 2001 From: IniKiwi Date: Sat, 1 Jul 2023 12:39:46 +0200 Subject: [PATCH] post: fix duplicate code --- app/templates/widgets/thread.html | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/templates/widgets/thread.html b/app/templates/widgets/thread.html index c790396..1add484 100644 --- a/app/templates/widgets/thread.html +++ b/app/templates/widgets/thread.html @@ -32,13 +32,9 @@ Déplacer {% endif %} - {% if can_punish %} - {% if post.author.type == "member" %} - Supprimer{{ suffix }} (normal) - Supprimer{{ suffix }} (pénalité) - {% else %} - Supprimer{{ suffix }} - {% endif %} + {% if can_punish and post.author.type == "member"%} + Supprimer{{ suffix }} (normal) + Supprimer{{ suffix }} (pénalité) {% elif can_delete %} Supprimer{{ suffix }} {% endif %}