Added changelog views

This commit is contained in:
Jeremy Stretch
2018-06-14 16:15:14 -04:00
parent 21c4085c51
commit 3c2e0b0b17
26 changed files with 790 additions and 507 deletions

View File

@@ -0,0 +1,36 @@
{% extends base_template %}
{% block title %}{% if obj %}{{ obj }}{% else %}{{ block.super }}{% endif %} - Changelog{% endblock %}
{% block content %}
{% if obj %}<h1>{{ obj }}</h1>{% endif %}
<table class="table">
<thead>
<tr>
<th>Time</th>
<th>User</th>
<th>Action</th>
<th></th>
</tr>
</thead>
<tbody>
{% for change in changes %}
<tr>
<td>{{ change.time }}</td>
<td>{{ change.user }}</td>
<td>{{ change.get_action_display }}</td>
<td>
<button class="btn btn-xs btn-primary" type="button" data-toggle="collapse" data-target="#change{{ change.pk }}" aria-expanded="false" aria-controls="collapseExample">
<i class="fa fa-search"></i>
</button>
</td>
</tr>
<tr class="collapse" id="change{{ change.pk }}">
<td colspan="4">
<pre class="well">{{ change.object_data_pretty }}</pre>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}