mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-02 21:32:15 +00:00
Versioning template improvements
//TODO Rather than have seperate asset templates, convert 'id' into a template variable
This commit is contained in:
29
versioning/templates/partials/version_history_table.html
Normal file
29
versioning/templates/partials/version_history_table.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% load to_class_name from filters %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th scope="col">Date</td>
|
||||
<th scope="col">Version ID</td>
|
||||
<th scope="col">User</td>
|
||||
<th scope="col">Changes</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for version in object_list %}
|
||||
<tr>
|
||||
<th scope="row">{{ version.revision.date_created }}</th>
|
||||
<td>{{ version.pk }}|{{ version.revision.pk }}</td>
|
||||
<td>{{ version.revision.user.name }}</td>
|
||||
<td>
|
||||
{% if version.changes.old is None %}
|
||||
{{object|to_class_name}} Created
|
||||
{% else %}
|
||||
{% include 'version_changes.html' %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user