diff options
Diffstat (limited to 'app/dispatch/templates')
| -rw-r--r-- | app/dispatch/templates/dispatch/log/summary.html | 74 |
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 %} |
