Files
PyRIGS/RIGS/templates/RIGS/event_version_list.html
2015-05-23 14:57:29 +01:00

52 lines
1.7 KiB
HTML

{% extends request.is_ajax|yesno:"base_ajax.html,base.html" %}
{% load static %}
{% block title %}N{{ object.pk|stringformat:"05d" }} - Revision History{% endblock %}
{% block js %}
<script src="{% static "js/tooltip.js" %}"></script>
<script src="{% static "js/popover.js" %}"></script>
<script>
$(function () {
$('[data-toggle="popover"]').popover().click(function(){
if($(this).attr('href')){
window.location.href = $(this).attr('href');
}
});
})
</script>
{% endblock %}
{% block content %}
<h2>N{{ object.pk|stringformat:"05d" }} - Revision History </h2>
<br>
<table class="table table-striped">
<thead>
<tr>
<td>Version ID</td>
<td>Date</td>
<td>User</td>
<td>Changes</td>
</tr>
</thead>
<tbody>
{% for version in object_list %}
{% if version.item_changes or version.field_changes or version.old == None %}
<tr>
<td>{{ version.version.pk }}|{{ version.revision.pk }}</td>
<td>{{ version.revision.date_created|date:"RIGS_DATETIME_FORMAT" }}</td>
<td>{{ version.revision.user.name }}</td>
<td>
{% if version.old == None %}
Event Created
{% else %}
{% include 'RIGS/version_changes.html' %}
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endblock %}