From 098c45e241f1069e8b19f7346f234101a6a7bb47 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Sat, 15 Apr 2017 20:50:05 +0200 Subject: [PATCH] Only show delete/edit buttons in header if user is allowed to edit the object --- templates/whoisdb/handle_panel.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/whoisdb/handle_panel.html b/templates/whoisdb/handle_panel.html index 022ad1b..4b8db9a 100644 --- a/templates/whoisdb/handle_panel.html +++ b/templates/whoisdb/handle_panel.html @@ -1,13 +1,17 @@ +{% load handletags %} + {% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-edit" as editView %} {% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-delete" as deleteView %}
{{ object }} ({{ object.getClassName }}) + {% if object|userCanEdit:request.user %} + {% endif %}
{% include "whoisdb/handle_table.html" with object=object %}