aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/templates
diff options
context:
space:
mode:
Diffstat (limited to 'app/dispatch/templates')
-rw-r--r--app/dispatch/templates/dispatch/drivers/detail.html14
-rw-r--r--app/dispatch/templates/dispatch/generic_load_listing.html4
-rw-r--r--app/dispatch/templates/dispatch/nav.html1
3 files changed, 15 insertions, 4 deletions
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 %}
<div class="row">
<div class="col s12">
- <h1>Driver Summary for {{ object.first_name }} {{ object.last_name }}</h1>
+ <h1>Summary for {{ object.first_name }} {{ object.last_name }}</h1>
<h2>Loads for {{week_dates.start_date|date:"l, F, d"}} to {{week_dates.end_date|date:"l, F, d"}}</h2>
</div>
</div>
@@ -30,6 +30,8 @@
</div>
+
+
<div class="row">
<div class="col s6 left-align">
<a href="{% url 'driver_detail' object.id %}?date={{week_dates.previous_week|date:"m/d/Y"}}" class="btn blue"><i class="material-icons left">arrow_back</i> Prev</a>
@@ -53,10 +55,13 @@
</div>
{% 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 %}
+<!--
<div class="row">
<div class="col s6 left-align">
<a href="{% url 'driver_detail' object.id %}?date={{week_dates.previous_week|date:"m/d/Y"}}" class="btn blue"><i class="material-icons left">arrow_back</i> Prev</a>
@@ -65,5 +70,6 @@
<a href="{% url 'driver_detail' object.id %}?date={{week_dates.next_week|date:"m/d/Y"}}" class="btn blue"><i class="material-icons right">arrow_forward</i> Next</a>
</div>
</div>
+-->
{% 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 %}
<tr class="green lighten-4">
{% if "Customer" in load_headers %}
+ {% if request.user.is_superuser %}
<td><a href="{% url 'customer_detail' load.customer.id %}">{{ load.customer.name }}</a></td>
+ {% else %}
+ <td>{{ load.customer.name }}</td>
+ {% endif %}
{% endif %}
{% if "Driver" in load_headers %}
<td><a href="{% url 'driver_detail' load.user.id %}">{{ load.user.first_name }} {{ load.user.last_name }}</a></td>
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 @@
<li><a href="{% url 'driver_list' %}">Drivers</a></li>
<li><a href="{% url 'customer_list' %}">Customers</a></li>
{% else %}
+ <li><a href="{% url 'driver_detail' request.user.id %}">Summary</a>
<li><a href="{% url 'driver_edit' request.user.id %}">My Account</a></li>
{% endif %}
<li><a href="{% url 'logout' %}">Logout</a></li>