From cf1598fe2cdfa72b3cd6d98b34f331b2cc4ba11d Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Fri, 18 Aug 2017 00:59:25 -0400 Subject: [PATCH] Add permissions check for timer detail view buttons. --- core/templates/core/timer_detail.html | 36 ++++++++++++++++++--------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/core/templates/core/timer_detail.html b/core/templates/core/timer_detail.html index 4cc34d7e..53b2aaf3 100644 --- a/core/templates/core/timer_detail.html +++ b/core/templates/core/timer_detail.html @@ -6,17 +6,29 @@

{{ object.duration }}

Started {{ object.start }} by {{ object.user }}

- Feeding - Sleep - Tummy Time - Delete Timer + + {% if perms.core.add_feeding %} + Feeding + {% endif %} + + {% if perms.core.add_sleep %} + Sleep + {% endif %} + + {% if perms.core.add_tummytime %} + Tummy Time + {% endif %} + + {% if perms.core.delete_timer %} + Delete Timer + {% endif %}
{% endblock %} \ No newline at end of file