Files
PyRIGS/versioning/templates/partials/activity_table_body.html
FreneticScribbler d216dd4c74 Versioning template improvements
//TODO Rather than have seperate asset templates, convert 'id' into a template variable
2020-04-06 03:15:43 +01:00

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>