From 739418feb6b7114bba692b3a08a89bcd23cd54b9 Mon Sep 17 00:00:00 2001 From: moanos Date: Tue, 6 Aug 2024 19:39:44 +0200 Subject: [PATCH] feat: Don't display edit buttons when no permission --- .../partials/partial-animal-card.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/fellchensammlung/templates/fellchensammlung/partials/partial-animal-card.html b/src/fellchensammlung/templates/fellchensammlung/partials/partial-animal-card.html index 34d837d..aa33707 100644 --- a/src/fellchensammlung/templates/fellchensammlung/partials/partial-animal-card.html +++ b/src/fellchensammlung/templates/fellchensammlung/partials/partial-animal-card.html @@ -8,11 +8,14 @@
{{ animal.species }}
{{ animal.get_sex_display }}
- -
- {% translate 'Bearbeiten' %} - {% translate 'Foto hinzufügen' %} -
+ + {% if has_edit_permission %} +
+ {% translate 'Bearbeiten' %} + {% translate 'Foto hinzufügen' %} +
+ {% endif %} {% if animal.description %}