page_hist.jinja 1.02 KB
Newer Older
Skia's avatar
Skia committed
1
2
{% extends "core/page.jinja" %}

Skia's avatar
Skia committed
3
4
{% from "core/macros.jinja" import user_profile_link %}

Skia's avatar
Skia committed
5
{% block page %}
Skia's avatar
Skia committed
6
    <h3>{% trans %}Page history{% endtrans %}</h3>
Skia's avatar
Skia committed
7
<p>{% trans page_name=page.name %}You're seeing the history of page "{{ page_name }}"{% endtrans %}</p>
Skia's avatar
Skia committed
8
<ul>
Skia's avatar
Skia committed
9
{% for r in (page.revisions.all()|sort(attribute='date', reverse=True)) %}
Skia's avatar
Skia committed
10
    {% if loop.index < 2 %}
Skia's avatar
Skia committed
11
12
13
    <li><a href="{{ url('core:page', page_name=page.get_full_name()) }}">{% trans %}last{% endtrans %}</a> -
    {{ user_profile_link(page.revisions.last().author) }} -
    {{ page.revisions.last().date|localtime|date(DATETIME_FORMAT) }} {{ page.revisions.last().date|localtime|time(DATETIME_FORMAT) }}</a></li>
Skia's avatar
Skia committed
14
    {% else %}
Skia's avatar
Skia committed
15
16
17
    <li><a href="{{ url('core:page_rev', page_name=page.get_full_name(), rev=r['id']) }}">{{ r.revision }}</a> -
    {{ user_profile_link(r.author) }} -
    {{ page.revisions.last().date|localtime|date(DATETIME_FORMAT) }} {{ page.revisions.last().date|localtime|time(DATETIME_FORMAT) }}</a></li>
Skia's avatar
Skia committed
18
    {% endif %}
Skia's avatar
Skia committed
19
{% endfor %}
Skia's avatar
Skia committed
20
</ul>
Skia's avatar
Skia committed
21
22
23
24
25
{% endblock %}