mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-18 01:32:17 -06:00
Added changelog views
This commit is contained in:
36
netbox/templates/extras/changelog.html
Normal file
36
netbox/templates/extras/changelog.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user