last_unread.jinja 1.13 KB
Newer Older
Skia's avatar
Skia committed
1 2 3 4 5 6 7 8
{% extends "core/base.jinja" %}
{% from 'forum/macros.jinja' import display_topic %}

{% block title %}
{% trans %}Last unread messages{% endtrans %}
{% endblock %}

{% block content %}
Skia's avatar
Skia committed
9
<p>
Skia's avatar
Skia committed
10
    <a href="{{ url('forum:main') }}">Forum</a> >
Skia's avatar
Skia committed
11
    <a href="{{ url('forum:last_unread') }}">{% trans %}Last unread messages{% endtrans %}</a>
Skia's avatar
Skia committed
12 13
</p>
<div id="forum">
Skia's avatar
Skia committed
14 15 16
    <h3>{% trans %}Forum{% endtrans %}</h3>
    <h4>{% trans %}Last unread messages{% endtrans %}</h4>
    <p>
Skia's avatar
Skia committed
17 18
        <a class="ib button" href="{{ url('forum:mark_all_as_read') }}">{% trans %}Mark all as read{% endtrans %}</a>
        <a class="ib button" href="{{ url('forum:last_unread') }}">{% trans %}Refresh{% endtrans %}</a>
Skia's avatar
Skia committed
19
    </p>
Skia's avatar
Skia committed
20
    {% for t in page_obj.object_list %}
21
    {% if user.can_view(t) %}
Skia's avatar
Skia committed
22
    {{ display_topic(t, user, True) }}
23
    {% endif %}
Skia's avatar
Skia committed
24
    {% endfor %}
Skia's avatar
Skia committed
25 26 27 28 29 30 31 32

    <p style="text-align: right; background: #d8e7f3;">
    {% for p in paginator.page_range %}
        <span class="ib" style="background: {% if p == paginator.number %}white{% endif %}; margin: 0;">
            <a href="?page={{ p }}">{{ p }}</a>
        </span>
    {% endfor %}
    </p>
Skia's avatar
Skia committed
33
</div>
Skia's avatar
Skia committed
34 35 36 37
{% endblock %}