From d4522cf8fc8e8978e65980d13debe38658903735 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Mon, 23 Oct 2017 12:41:36 -0400 Subject: Add to Driver's navigation. Remove redundant load listing under driver's view. Update Readme --- app/dispatch/templates/dispatch/drivers/detail.html | 14 ++++++++++---- app/dispatch/templates/dispatch/generic_load_listing.html | 4 ++++ app/dispatch/templates/dispatch/nav.html | 1 + 3 files changed, 15 insertions(+), 4 deletions(-) (limited to 'app/dispatch') diff --git a/app/dispatch/templates/dispatch/drivers/detail.html b/app/dispatch/templates/dispatch/drivers/detail.html index c4c19e8..11e07a9 100644 --- a/app/dispatch/templates/dispatch/drivers/detail.html +++ b/app/dispatch/templates/dispatch/drivers/detail.html @@ -5,7 +5,7 @@ {% block content %}
-

Driver Summary for {{ object.first_name }} {{ object.last_name }}

+

Summary for {{ object.first_name }} {{ object.last_name }}

Loads for {{week_dates.start_date|date:"l, F, d"}} to {{week_dates.end_date|date:"l, F, d"}}

@@ -30,6 +30,8 @@ + +
arrow_back Prev @@ -53,10 +55,13 @@
{% endif %} -{% load custom_tags %} -{% listForCommaString "Customer,Amount,Description" as load_headers %} -{% include "dispatch/generic_load_listing.html" %} +{% if request.user.is_superuser %} + {% load custom_tags %} + {% listForCommaString "Customer,Amount,Description" as load_headers %} + {% include "dispatch/generic_load_listing.html" %} +{% endif %} + {% endblock %} diff --git a/app/dispatch/templates/dispatch/generic_load_listing.html b/app/dispatch/templates/dispatch/generic_load_listing.html index 235a371..7fb42f1 100644 --- a/app/dispatch/templates/dispatch/generic_load_listing.html +++ b/app/dispatch/templates/dispatch/generic_load_listing.html @@ -30,7 +30,11 @@ {% for load in loads|keyvalue:date %} {% if "Customer" in load_headers %} + {% if request.user.is_superuser %} {{ load.customer.name }} + {% else %} + {{ load.customer.name }} + {% endif %} {% endif %} {% if "Driver" in load_headers %} {{ load.user.first_name }} {{ load.user.last_name }} diff --git a/app/dispatch/templates/dispatch/nav.html b/app/dispatch/templates/dispatch/nav.html index c53a07e..20a2e83 100644 --- a/app/dispatch/templates/dispatch/nav.html +++ b/app/dispatch/templates/dispatch/nav.html @@ -4,6 +4,7 @@
  • Drivers
  • Customers
  • {% else %} +
  • Summary
  • My Account
  • {% endif %}
  • Logout
  • -- cgit v1.2.3