layerindex-web/templates/layerindex/history.html
Paul Eggleton f527692c7c Replace custom pagination with django-bootstrap-pagination
Simplify things a bit. We lose the digg-style pagination but the new
behaviour is good enough and improves maintainability.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00

72 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% comment %}
layerindex-web - history list page template
Copyright (C) 2013 Intel Corporation
Licensed under the MIT license, see COPYING.MIT for details
{% endcomment %}
<!--
{% block title_append %} - history{% endblock %}
-->
{% block content %}
{% autoescape on %}
<h2>Change history</h2>
<table class="table table-striped table-bordered layerstable">
<thead>
<tr>
<th>Date/time</th>
<th>User</th>
<th>Change</th>
</tr>
</thead>
<tbody>
{% for revision in revisions %}
{% if revision.comment != 'No changes' %}
<tr>
<td>{{ revision.date_created|timesince }} ago</td>
<td>{{ revision.user }}</td>
<td>
{% if revision.comment %}
{{ revision.comment|linebreaksbr }}
{% else %}
{% for version in revision.version_set.all %}
{% if version.type == 0 %}
Added
{% elif version.type == 1 %}
Changed
{% elif version.type == 2 %}
Deleted
{% endif %}
{{ version.content_type.name.lower }}: {{ version.object_repr }}
<br>
{% endfor %}
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% if is_paginated %}
{% load bootstrap_pagination %}
<div class="text-center">
{% bootstrap_paginate page_obj range=10 show_prev_next="false" show_first_last="true" %}
</div>
{% endif %}
{% endautoescape %}
{% endblock %}