From e4d865b1a61f6a72551e70abad78c6c35b9345e7 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Wed, 1 Nov 2017 00:10:47 -0400 Subject: Fix user permissions. Hide generate invoice on the summary page if it is empty. Hide load delete option from regular users as they don't have permission anyway --- app/dispatch/templates/dispatch/drivers/summary.html | 3 +++ app/dispatch/templates/dispatch/loads/detail.html | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'app/dispatch/templates') diff --git a/app/dispatch/templates/dispatch/drivers/summary.html b/app/dispatch/templates/dispatch/drivers/summary.html index d849e9d..5da7d3c 100644 --- a/app/dispatch/templates/dispatch/drivers/summary.html +++ b/app/dispatch/templates/dispatch/drivers/summary.html @@ -10,6 +10,8 @@ + +{% if loads_nosplit.all %}
@@ -17,6 +19,7 @@
+{% endif %} {% if not request.user.is_superuser %}
diff --git a/app/dispatch/templates/dispatch/loads/detail.html b/app/dispatch/templates/dispatch/loads/detail.html index 5be54a1..288fdd8 100644 --- a/app/dispatch/templates/dispatch/loads/detail.html +++ b/app/dispatch/templates/dispatch/loads/detail.html @@ -10,11 +10,15 @@
+ {% if request.user.is_superuser %}
{% csrf_token %} Delete Edit
+ {% else %} + Edit + {% endif %}
-- cgit v1.2.3