diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2017-10-19 19:48:36 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2017-10-19 19:48:36 -0400 |
| commit | a3e719469b9efc0db361a419cd7c2fe04ccaad22 (patch) | |
| tree | 5611d51d8f760c6fa13c8e5772b285e5e326e40a /app/dispatch/templates | |
| parent | fbcbf80d1d66d49724416c0b37dc2e1e8aee859e (diff) | |
| download | dispatch-tracker-a3e719469b9efc0db361a419cd7c2fe04ccaad22.tar.gz dispatch-tracker-a3e719469b9efc0db361a419cd7c2fe04ccaad22.tar.xz | |
Re-indented the generic load listing template
Diffstat (limited to 'app/dispatch/templates')
| -rw-r--r-- | app/dispatch/templates/dispatch/generic_load_listing.html | 117 |
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 %} |
