mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Move changelog table out of card
This commit is contained in:
@ -35,52 +35,47 @@
|
|||||||
{# Changelog #}
|
{# Changelog #}
|
||||||
<div class="row my-4 flex-grow-1 changelog-container">
|
<div class="row my-4 flex-grow-1 changelog-container">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="card">
|
<h5 class="text-center">Changelog</h5>
|
||||||
<h4 class="card-header">Changelog</h4>
|
{% if changelog and perms.extras.view_objectchange %}
|
||||||
<div class="card-body">
|
{# TODO: Replace this with a django-tables2 Table #}
|
||||||
{% if changelog and perms.extras.view_objectchange %}
|
<table class="table align-middle table-hover">
|
||||||
{# TODO: Replace this with a django-tables2 Table #}
|
<thead>
|
||||||
<table class="table align-middle table-hover">
|
<tr>
|
||||||
<thead>
|
<th scope="col">User</th>
|
||||||
<tr>
|
<th scope="col">Action</th>
|
||||||
<th scope="col">User</th>
|
<th scope="col">Type</th>
|
||||||
<th scope="col">Action</th>
|
<th scope="col">Object</th>
|
||||||
<th scope="col">Type</th>
|
<th scope="col">Time</th>
|
||||||
<th scope="col">Object</th>
|
<th scope="col" align="right"></th>
|
||||||
<th scope="col">Time</th>
|
</tr>
|
||||||
<th scope="col" align="right"></th>
|
</thead>
|
||||||
</tr>
|
<tbody>
|
||||||
</thead>
|
{% for change in changelog %}
|
||||||
<tbody>
|
<tr class="{% get_status change.get_action_display %}">
|
||||||
{% for change in changelog %}
|
<th scope="row">{{ change.user|default:change.user_name }}</th>
|
||||||
<tr class="{% get_status change.get_action_display %}">
|
<td>{{ change.get_action_display|bettertitle }}</td>
|
||||||
<th scope="row">{{ change.user|default:change.user_name }}</th>
|
<td>{{ change.changed_object_type.name|bettertitle }}</td>
|
||||||
<td>{{ change.get_action_display|bettertitle }}</td>
|
<td>
|
||||||
<td>{{ change.changed_object_type.name|bettertitle }}</td>
|
{% if change.changed_object.get_absolute_url %}
|
||||||
<td>
|
<a class="text-body" href="{{ change.changed_object.get_absolute_url }}">{{ change.changed_object }}</a>
|
||||||
{% if change.changed_object.get_absolute_url %}
|
{% else %} {{ change.changed_object|default:change.object_repr }} {% endif %}
|
||||||
<a class="text-body" href="{{ change.changed_object.get_absolute_url }}">{{ change.changed_object }}</a>
|
</td>
|
||||||
{% else %} {{ change.changed_object|default:change.object_repr }} {% endif %}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td>{{ change.time|date:'SHORT_DATETIME_FORMAT' }}</td>
|
|
||||||
<td>
|
|
||||||
<a role="button" class="text-body" href="{{ change.get_absolute_url }}">
|
|
||||||
<i class="mdi mdi-dots-horizontal" data-bs-toggle="tooltip" data-bs-placement="left" title="View Change Details"></i>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% elif perms.extras.view_objectchange %}
|
|
||||||
<div class="alert alert-secondary mt-4" role="alert">
|
|
||||||
No change history found.
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
<td>{{ change.time|date:'SHORT_DATETIME_FORMAT' }}</td>
|
||||||
|
<td>
|
||||||
|
<a role="button" class="text-body" href="{{ change.get_absolute_url }}">
|
||||||
|
<i class="mdi mdi-dots-horizontal" data-bs-toggle="tooltip" data-bs-placement="left" title="View Change Details"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% elif perms.extras.view_objectchange %}
|
||||||
|
<div class="alert alert-secondary mt-4" role="alert">
|
||||||
|
No change history found.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
Reference in New Issue
Block a user