Files
PyRIGS/versioning/templates/partials/activity_table_body.html

34 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.display_name }}</a></td>
<td>{{ version.display_id }}</td>
<td>{% include 'partials/linked_name.html' with profile=version.revision.user %}</td>
<td>
{% if version.changes.old == None %}
Created {{version.changes.new|to_class_name}}
{% elif version.changes.new == None %}
Deleted {{version.changes.old|to_class_name}}
{% else %}
{% include 'partials/version_changes.html' %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>