aboutsummaryrefslogtreecommitdiffstats
path: root/templates/layerindex/history.html
blob: 12ff93fcc34daf8f2ff865c207e68d25d1b85365 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{% 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 pagination %}
        {% pagination page_obj %}
    {% endif %}


{% endautoescape %}
{% endblock %}