2017-01-21 02:42:06 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
|
|
|
{% from 'forum/macros.jinja' import display_forum %}
|
2017-01-21 11:28:32 +00:00
|
|
|
{% from 'core/macros.jinja' import user_profile_link %}
|
2017-01-21 02:42:06 +00:00
|
|
|
|
|
|
|
{% block content %}
|
2017-01-21 03:19:15 +00:00
|
|
|
<p>
|
|
|
|
<a href="{{ url('forum:main') }}">Forum</a>
|
|
|
|
{% for f in forum.get_parent_list() %}
|
|
|
|
> <a href="{{ f.get_absolute_url() }}">{{ f }}</a>
|
|
|
|
{% endfor %}
|
|
|
|
> <a href="{{ forum.get_absolute_url() }}">{{ forum }}</a>
|
|
|
|
</p>
|
2017-01-21 02:42:06 +00:00
|
|
|
<h3>{{ forum.name }}</h3>
|
|
|
|
<a href="{{ url('forum:new_forum') }}?parent={{ forum.id }}">New forum</a>
|
|
|
|
{% for f in forum.children.all() %}
|
|
|
|
{{ display_forum(f) }}
|
|
|
|
{% endfor %}
|
2017-01-21 11:28:32 +00:00
|
|
|
{% for t in topics %}
|
2017-01-21 02:42:06 +00:00
|
|
|
<div class="topic">
|
|
|
|
<p>
|
|
|
|
<a href="{{ url('forum:edit_topic', topic_id=t.id) }}">Edit</a>
|
|
|
|
</p>
|
2017-01-21 11:28:32 +00:00
|
|
|
<a href="{{ url('forum:view_topic', topic_id=t.id) }}">
|
|
|
|
<div style="display: inline-block; width: 80%">
|
|
|
|
<h5>{{ t.title }}</h5>
|
|
|
|
<p>{{ t.description }}</p>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
<div style="display: inline-block; width: 19%">
|
|
|
|
{% set last_msg = t.messages.order_by('id').last() %}
|
|
|
|
<p>Last message by {{ user_profile_link(last_msg.author) }} at {{ last_msg.date|date(DATETIME_FORMAT) }} {{
|
|
|
|
last_msg.date|time(DATETIME_FORMAT) }}</p>
|
|
|
|
</div>
|
2017-01-21 02:42:06 +00:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
<a href="{{ url('forum:new_topic', forum_id=forum.id) }}">New topic</a>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|