2017-01-21 02:42:06 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
2018-12-13 13:07:22 +00:00
|
|
|
{% from 'forum/macros.jinja' import display_forum, display_breadcrumb, display_topic, display_search_bar %}
|
2017-01-28 23:16:41 +00:00
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ forum }}
|
|
|
|
{% endblock %}
|
2017-01-21 02:42:06 +00:00
|
|
|
|
|
|
|
{% block content %}
|
2018-12-13 13:07:22 +00:00
|
|
|
{{ display_breadcrumb(forum) }}
|
2017-05-20 10:40:30 +00:00
|
|
|
<div id="forum">
|
2017-01-21 02:42:06 +00:00
|
|
|
<h3>{{ forum.name }}</h3>
|
2017-01-28 19:58:54 +00:00
|
|
|
<p>
|
2018-04-26 13:20:45 +00:00
|
|
|
{% if user.is_in_group(settings.SITH_GROUP_FORUM_ADMIN_ID) or user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) or user.can_edit(forum) %}
|
2018-02-22 21:14:26 +00:00
|
|
|
<a class="ib button" href="{{ url('forum:new_forum') }}?parent={{ forum.id }}">{% trans %}New forum{% endtrans %}</a> <br/>
|
2017-01-28 19:58:54 +00:00
|
|
|
{% endif %}
|
2017-06-13 22:47:16 +00:00
|
|
|
{% if not forum.is_category %}
|
2018-02-22 21:14:26 +00:00
|
|
|
<a class="ib button" href="{{ url('forum:new_topic', forum_id=forum.id) }}">{% trans %}New topic{% endtrans %}</a>
|
2017-06-13 22:47:16 +00:00
|
|
|
{% endif %}
|
2018-12-12 15:54:19 +00:00
|
|
|
{{ display_search_bar(request) }}
|
2017-01-28 19:58:54 +00:00
|
|
|
</p>
|
2017-02-24 14:55:50 +00:00
|
|
|
{% if forum.children.exists() %}
|
|
|
|
<div>
|
|
|
|
<div class="ib w_big">
|
2017-02-24 16:22:13 +00:00
|
|
|
{% trans %}Title{% endtrans %}
|
2017-02-24 14:55:50 +00:00
|
|
|
</div>
|
|
|
|
<div class="ib w_small">
|
|
|
|
<div class="ib w_medium">
|
2017-02-24 16:22:13 +00:00
|
|
|
{% trans %}Topics{% endtrans %}
|
2017-02-24 14:55:50 +00:00
|
|
|
</div>
|
|
|
|
<div class="ib w_small">
|
2017-02-24 16:22:13 +00:00
|
|
|
{% trans %}Last message{% endtrans %}
|
2017-02-24 14:55:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-20 10:40:30 +00:00
|
|
|
{{ display_forum(forum, user, True) }}
|
2017-05-30 20:10:50 +00:00
|
|
|
{% for f in forum.children.all().select_related("_last_message__author", "_last_message__topic") %}
|
2017-01-28 19:58:54 +00:00
|
|
|
{{ display_forum(f, user) }}
|
2017-01-21 02:42:06 +00:00
|
|
|
{% endfor %}
|
2017-02-24 14:55:50 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if topics %}
|
|
|
|
<div>
|
|
|
|
<div class="ib w_medium">
|
2017-02-24 16:22:13 +00:00
|
|
|
{% trans %}Title{% endtrans %}
|
2017-02-24 14:55:50 +00:00
|
|
|
</div>
|
|
|
|
<div class="ib w_medium">
|
|
|
|
<div class="ib w_small">
|
2017-02-24 16:22:13 +00:00
|
|
|
{% trans %}Author{% endtrans %}
|
2017-02-24 14:55:50 +00:00
|
|
|
</div>
|
|
|
|
<div class="ib w_medium">
|
2017-02-24 16:22:13 +00:00
|
|
|
{% trans %}Messages{% endtrans %}
|
2017-02-24 14:55:50 +00:00
|
|
|
</div>
|
|
|
|
<div class="ib w_small">
|
2017-02-24 16:22:13 +00:00
|
|
|
{% trans %}Last message{% endtrans %}
|
2017-02-24 14:55:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-21 11:28:32 +00:00
|
|
|
{% for t in topics %}
|
2017-01-28 23:16:41 +00:00
|
|
|
{{ display_topic(t, user) }}
|
2017-01-21 02:42:06 +00:00
|
|
|
{% endfor %}
|
2017-05-20 10:40:30 +00:00
|
|
|
<p style="text-align: right; background: #d8e7f3;">
|
|
|
|
{% for p in topics.paginator.page_range %}
|
|
|
|
<span class="ib" style="background: {% if p == topics.number %}white{% endif %}; margin: 0;"><a href="?topic_page={{ p }}">{{ p }}</a></span>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
2017-02-24 14:55:50 +00:00
|
|
|
{% endif %}
|
2017-05-20 10:40:30 +00:00
|
|
|
</div>
|
2017-01-21 02:42:06 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|