aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/templates
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2018-02-13 21:40:48 -0500
committerMitch Riedstra <mitch@riedstra.us>2018-02-13 21:40:48 -0500
commit49f9df9b774b48ceef6f3a99f7a6f4912730dc5f (patch)
tree5014e304fa69c0d48ae842780c488440314f0576 /app/dispatch/templates
parent1d5d056670d9d63d27d6363de4563435d5ff4cdb (diff)
downloaddispatch-tracker-49f9df9b774b48ceef6f3a99f7a6f4912730dc5f.tar.gz
dispatch-tracker-49f9df9b774b48ceef6f3a99f7a6f4912730dc5f.tar.xz
Add logging for Invoices, User Invoice Number, and Identity. Added template to show audit logs as well as a view
Diffstat (limited to 'app/dispatch/templates')
-rw-r--r--app/dispatch/templates/dispatch/log/summary.html74
1 files changed, 74 insertions, 0 deletions
diff --git a/app/dispatch/templates/dispatch/log/summary.html b/app/dispatch/templates/dispatch/log/summary.html
new file mode 100644
index 0000000..37e7d13
--- /dev/null
+++ b/app/dispatch/templates/dispatch/log/summary.html
@@ -0,0 +1,74 @@
+{% extends 'dispatch/base.html' %}
+
+{% block title %}Recent User Activities{% endblock %}
+
+{% block content %}
+<div class="row">
+ <div class="col s12">
+ <h1>Recent User Activities</h1>
+ </div>
+</div>
+
+{% load dynamic_key %}
+
+
+<!-- {{object_list}} -->
+
+ <div class="row">
+ <div class="col s12">
+ <!-- <h4>Recent Changes</h4> -->
+ <ul class="collapsible popout" data-collapsible="accordion">
+ {% for h in object_list %}
+ {% if h.actor is not None %}
+ <li>
+ <div class="collapsible-header">
+ <!-- this seems to be a shitty hack, but I'm going to leave it -->
+ <div class="col s12">
+ Change By: {{h.actor}}
+ </div>
+
+ <div class="col s12">
+ Date: {{h.timestamp}}
+ </div>
+
+ <div class="col s12">
+ Model: {{h.content_type.model}}
+ </div>
+
+ <div class="col s12">
+ Action:
+ {% if h.action == h.Action.CREATE %}
+ <td>Create</td>
+ {% elif h.action == h.Action.UPDATE %}
+ <td>Update</td>
+ {% elif h.action == h.Action.DELETE %}
+ <td>Delete</td>
+ {% endif %}
+ </div>
+ </div>
+ <div class="collapsible-body">
+ <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>
+ </div>
+ </li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+
+{% endblock %}