main.jinja 1.76 KB
Newer Older
Skia's avatar
Skia committed
1 2 3 4
{% extends "core/base.jinja" %}
{% from 'core/macros.jinja' import user_profile_link %}
{% from 'forum/macros.jinja' import display_forum %}

Skia's avatar
Skia committed
5 6 7 8
{% block title %}
{% trans %}Forum{% endtrans %}
{% endblock %}

Skia's avatar
Skia committed
9
{% block content %}
Skia's avatar
Skia committed
10 11 12 13
<p>
<a href="{{ url('forum:main') }}">{% trans %}Forum{% endtrans %}</a> >
</p>
<div id="forum">
Skia's avatar
Skia committed
14
    <h3>{% trans %}Forum{% endtrans %}</h3>
15
    <p>
Skia's avatar
Skia committed
16
        <a class="ib button" href="{{ url('forum:last_unread') }}">{% trans %}View last unread messages{% endtrans %}</a>
Skia's avatar
Skia committed
17
        <a class="ib button" href="{{ url('forum:favorite_topics') }}">{% trans %}Favorite topics{% endtrans %}</a>
Skia's avatar
Skia committed
18
    </p>
19
    {% if user.is_in_group(settings.SITH_GROUP_FORUM_ADMIN_ID) or user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) %}
Skia's avatar
Skia committed
20 21
    <p>
        <a href="{{ url('forum:new_forum') }}">{% trans %}New forum{% endtrans %}</a>
22
    </p>
Skia's avatar
Skia committed
23
    {% endif %}
24 25 26 27
                <form action="{{ url('forum:search') }}" method="GET" id="header_search">
                    <input type="text" placeholder="{% trans %}Search{% endtrans %}" name="query" id="search" />
                    <input type="submit" value="{% trans %}Search{% endtrans %}" style="display: none;" />
                </form>
Skia's avatar
Skia committed
28 29 30 31 32 33 34 35 36 37 38 39 40
    <div>
        <div class="ib w_big">
            {% trans %}Title{% endtrans %}
        </div>
        <div class="ib w_small">
            <div class="ib w_medium">
                {% trans %}Topics{% endtrans %}
            </div>
            <div class="ib w_small">
                {% trans %}Last message{% endtrans %}
            </div>
        </div>
    </div>
41

Skia's avatar
Skia committed
42
    {% for f in forum_list %}
Skia's avatar
Skia committed
43 44
    <div>
    {{ display_forum(f, user, True) }}
Skia's avatar
Skia committed
45
        {% for c in f.children.all() %}
46
        {{ display_forum(c, user) }}
Skia's avatar
Skia committed
47 48 49
        {% endfor %}
    </div>
    {% endfor %}
Skia's avatar
Skia committed
50
</div>
Skia's avatar
Skia committed
51 52 53 54
{% endblock %}