aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/templates
diff options
context:
space:
mode:
Diffstat (limited to 'app/dispatch/templates')
-rw-r--r--app/dispatch/templates/dispatch/loads/detail.html35
1 files changed, 31 insertions, 4 deletions
diff --git a/app/dispatch/templates/dispatch/loads/detail.html b/app/dispatch/templates/dispatch/loads/detail.html
index bf6d809..44997ee 100644
--- a/app/dispatch/templates/dispatch/loads/detail.html
+++ b/app/dispatch/templates/dispatch/loads/detail.html
@@ -3,14 +3,15 @@
{% block title %}Details - {{ object.load_number }}{% endblock %}
{% block content %}
+{% load dynamic_key %}
<div class="row">
<div class="col s12 m6">
<h1>Details for {{object.load_number}}</h1>
</div>
-</div>
+</div>
<div class="row">
- <div class="col s12">
+ <div class="col s12">
<div class="right-align">
<a class="btn blue" href="{%url 'load_edit' object.id %}">Edit</a>
</div>
@@ -82,11 +83,37 @@
{% endfor %}
</tbody>
</table>
-
</div>
</div>
+ <div class="row">
+ <div class="col s12">
+ <h4>Recent Changes</h4>
+ {% for h in object.history.get_queryset %}
+ {% if h.actor is not None %}
+ Change By: {{h.actor.first_name}} {{h.actor.last_name}} ( {{h.actor.email}} )
+ <table>
+ <thead>
+ <th>Field</th>
+ <th>From</th>
+ <th>To</th>
+ </thead>
+ <tbody>
+ {% for field, changes in h.changes_dict.items %}
+ <tr>
+ <th>{{field}}</th>
+ <td>{{changes|getindex:0}}</td>
+ <td>{{changes|getindex:1}}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% endif %}
+ {% endfor %}
+ </div>
+ </div>
+
-</div>
+</div>
{% endblock %}