]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/wiki/modules/list.html
wiki: Implement restoring pages
[ipfire.org.git] / src / templates / wiki / modules / list.html
1 {% for page in pages %}
2 <strong class="mb-0">
3 {% if show_breadcrumbs %}
4 {% for url, title in page.breadcrumbs %}
5 <a href="{{ url }}">{{ title }}</a> /
6 {% end %}
7 {% end %}
8
9 <a href="{{ page.url }}{% if link_revision %}?revision={{ page.timestamp.isoformat() }}{% end %}">{{ page.title }}</a>
10 </strong>
11
12 <p class="text-muted small">
13 {% if show_author %}
14 {{ _("Last edited %s") % locale.format_date(page.timestamp, shorter=True, relative=False) }}
15
16 {% if page.author %}
17 {{ _("by") }}
18 <a href="/users/{{ page.author.uid }}">{{ page.author }}</a>
19 {% end %}
20 {% end %}
21
22 {% if show_changes %}
23 {% if page.changes %}
24 &bull; {{ page.changes }}
25 {% end %}
26
27 {% if page.previous_revision %}
28 <a href="{{ page.url }}?action=diff&a={{ page.previous_revision.timestamp.isoformat() }}&b={{ page.timestamp.isoformat() }}">
29 <span class="fas fa-exchange-alt ml-1"></span>
30 </a>
31 {% end %}
32 {% end %}
33
34 {% if not page.is_latest_revision() %}
35 <a href="{{ page.url }}?action=restore&revision={{ page.timestamp.isoformat() }}" title="{{ _("Restore") }}">
36 <span class="fas fa-undo ml-1"></span>
37 </a>
38 {% end %}
39 </p>
40 {% end %}