layerindex-web/templates/layerindex/history.html
Tim Orling bd58fbe7df bootstrap_pagination: disable via comment
Wrap the is_pagination usage of bootstrap_pagination with comment/endcomment
to avoid incompatible module.

We will need to re-write the pagination code.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-10-05 20:09:12 -07:00

74 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 %}
{% comment %}
{% load bootstrap_pagination %}
<div class="text-center">
{% bootstrap_paginate page_obj range=10 show_prev_next="false" show_first_last="true" %}
</div>
{% endcomment %}
{% endif %}
{% endautoescape %}
{% endblock %}