aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'app/dispatch')
-rw-r--r--app/dispatch/templates/dispatch/generic_load_listing.html117
1 files changed, 58 insertions, 59 deletions
diff --git a/app/dispatch/templates/dispatch/generic_load_listing.html b/app/dispatch/templates/dispatch/generic_load_listing.html
index ed4399b..068ee0c 100644
--- a/app/dispatch/templates/dispatch/generic_load_listing.html
+++ b/app/dispatch/templates/dispatch/generic_load_listing.html
@@ -1,66 +1,65 @@
-
{% load dynamic_key %}
{% for date in loads %}
- <div class="row">
- <div class="col s12 card">
- <div class="card-content">
- <span class="card-title">{{date|date:"l F d"}}</span>
- <table class="striped bordered">
- <thead>
- <tr>
- {% for heading in load_headers %}
- <th>{{heading}}</th>
- {% endfor %}
- <!--
- Order is specific here, you're goign going to want to define
- the fields beforehand i.e.
+<div class="row">
+ <div class="col s12 card">
+ <div class="card-content">
+ <span class="card-title">{{date|date:"l F d"}}</span>
+ <table class="striped bordered">
+ <thead>
+ <tr>
+ {% for heading in load_headers %}
+ <th>{{heading}}</th>
+ {% endfor %}
+ <!--
+ Order is specific here, you're goign going to want to define
+ the fields beforehand i.e.
- \{\% load custom_tags %}
- \{\% listForCommaString "Company,Amount,Load Number,Description" as load_headers %}
- -->
- <!--
- <th>Company</th>
- <th>Driver</th>
- <th>Amount</th>
- <th>Load Number</th>
- <th>Description</th>
- -->
- </tr>
- </thead>
- <tbody>
- {% for load in loads|keyvalue:date %}
- <tr class="green lighten-4">
- {% if "Company" in load_headers %}
- <td><a href="{% url 'company_detail' load.company.id %}">{{ load.company.name }}</a></td>
- {% 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>
- {% endif %}
+ \{\% load custom_tags %}
+ \{\% listForCommaString "Company,Amount,Load Number,Description" as load_headers %}
+ -->
+ <!--
+ <th>Company</th>
+ <th>Driver</th>
+ <th>Amount</th>
+ <th>Load Number</th>
+ <th>Description</th>
+ -->
+ </tr>
+ </thead>
+ <tbody>
+ {% for load in loads|keyvalue:date %}
+ <tr class="green lighten-4">
+ {% if "Company" in load_headers %}
+ <td><a href="{% url 'company_detail' load.company.id %}">{{ load.company.name }}</a></td>
+ {% 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>
+ {% endif %}
- {% if "Amount" in load_headers %}
- {% if load.amount == 0 %}
- <td><span class="red-text">{{ load.amount }}</span></td>
- {% else %}
- <td>{{ load.amount }}</td>
- {% endif %}
- {% endif %}
- {% if "Load Number" in load_headers %}
- <td>{{ load.load_number }}</td>
- {% endif %}
- {% if "Description" in load_headers %}
- <td>{{ load.description }}</td>
- {% endif %}
- <td class="right-align">
- <!-- <a href="{% url 'load_edit' load.id %}" class="btn orange">Edit</a> -->
- <a href="{% url 'load_detail' load.id %}" class="btn blue">View</a>
- </td>
- </tr>
- {% empty %}
- <tr class="yellow lighten-4"><td colspan="5">No load.</td></tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
+ {% if "Amount" in load_headers %}
+ {% if load.amount == 0 %}
+ <td><span class="red-text">{{ load.amount }}</span></td>
+ {% else %}
+ <td>{{ load.amount }}</td>
+ {% endif %}
+ {% endif %}
+ {% if "Load Number" in load_headers %}
+ <td>{{ load.load_number }}</td>
+ {% endif %}
+ {% if "Description" in load_headers %}
+ <td>{{ load.description }}</td>
+ {% endif %}
+ <td class="right-align">
+ <!-- <a href="{% url 'load_edit' load.id %}" class="btn orange">Edit</a> -->
+ <a href="{% url 'load_detail' load.id %}" class="btn blue">View</a>
+ </td>
+ </tr>
+ {% empty %}
+ <tr class="yellow lighten-4"><td colspan="5">No load.</td></tr>
+ {% endfor %}
+ </tbody>
+ </table>
</div>
</div>
+</div>
{% endfor %}