mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
//TODO Rather than have seperate asset templates, convert 'id' into a template variable
38 lines
1.3 KiB
HTML
38 lines
1.3 KiB
HTML
{% load to_class_name from filters %}
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead class="thead-dark">
|
|
<tr>
|
|
<th scope="col">Date</th>
|
|
<th scope="col">Object</th>
|
|
<th scope="col">Version ID</th>
|
|
<th scope="col">User</th>
|
|
<th scope="col">Changes</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for version in object_list %}
|
|
<tr>
|
|
<th scope="row">{{ version.revision.date_created }}</th>
|
|
<td><a href="{{ version.changes.new.get_absolute_url }}">{{version.changes.new|to_class_name}}
|
|
{% if version.changes.new.asset_id %}
|
|
{{ version.changes.new.asset_id }}
|
|
{% else %}
|
|
{{ version.changes.new.pk|stringformat:"05d" }}
|
|
{% endif %}
|
|
</a></td>
|
|
<td>{{ version.pk }}|{{ version.revision.pk }}</td>
|
|
<td>{{ version.revision.user.name|default:"System" }}</td>
|
|
<td>
|
|
{% if version.changes.old == None %}
|
|
{{version.changes.new|to_class_name}} Created
|
|
{% else %}
|
|
{% include 'version_changes.html' %}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|