aboutsummaryrefslogtreecommitdiffstats
path: root/templates/layerindex/history.html
blob: fa7757ffa9b94574a891569c6d75553ec4f04ebe (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
{% 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 %}
        <tr>
            <td>{{ revision.date_created|timesince }} ago</td>
            <td>{{ revision.user }}</td>
            <td>
                {% 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 %}
            </td>
        </tr>
    {% endfor %}
    </tbody>
</table>

    {% if is_paginated %}
        {% load pagination %}
        {% pagination page_obj %}
    {% endif %}


{% endautoescape %}
{% endblock %}