2017-01-21 02:42:06 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
2017-01-21 03:19:15 +00:00
|
|
|
{% from 'core/macros.jinja' import user_profile_link %}
|
2018-12-13 13:07:22 +00:00
|
|
|
{% from 'forum/macros.jinja' import display_message, display_breadcrumb, display_search_bar %}
|
2017-01-21 02:42:06 +00:00
|
|
|
|
2017-01-28 23:16:41 +00:00
|
|
|
{% block title %}
|
|
|
|
{{ topic }}
|
|
|
|
{% endblock %}
|
|
|
|
|
2017-01-21 02:42:06 +00:00
|
|
|
{% block head %}
|
|
|
|
{{ super() }}
|
|
|
|
<style type="text/css" media="all">
|
|
|
|
.topic {
|
|
|
|
border: solid skyblue 1px;
|
|
|
|
padding: 2px;
|
|
|
|
margin: 2px;
|
|
|
|
}
|
|
|
|
.forum {
|
|
|
|
background: lightblue;
|
|
|
|
padding: 2px;
|
|
|
|
margin: 2px;
|
|
|
|
}
|
|
|
|
.category {
|
|
|
|
background: skyblue;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2018-12-13 13:07:22 +00:00
|
|
|
{{ display_breadcrumb(topic.forum, topic) }}
|
|
|
|
<h3>{{ topic.title }}</h3>
|
2017-05-20 10:40:30 +00:00
|
|
|
<div id="forum">
|
2017-01-21 02:42:06 +00:00
|
|
|
<p>{{ topic.description }}</p>
|
2018-02-22 21:19:17 +00:00
|
|
|
<p>
|
|
|
|
<a class="ib button" href="{{ url('forum:new_message', topic_id=topic.id) }}">{% trans %}Reply{% endtrans %}</a>
|
|
|
|
{% if user in topic.subscribed_users.all() %}
|
|
|
|
<a class="ib button" href="{{ url('forum:toggle_subscribe_topic', topic_id=topic.id) }}">{% trans %}Unmark as favorite{% endtrans %}</a>
|
|
|
|
{% else %}
|
|
|
|
<a class="ib button" href="{{ url('forum:toggle_subscribe_topic', topic_id=topic.id) }}">{% trans %}Mark as favorite{% endtrans %}</a>
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
2017-02-24 00:49:48 +00:00
|
|
|
|
2018-12-13 13:07:22 +00:00
|
|
|
{{ display_search_bar(request) }}
|
2017-03-12 19:24:16 +00:00
|
|
|
<p style="text-align: right; background: #d8e7f3;">
|
2017-03-15 17:34:22 +00:00
|
|
|
{% for p in msgs.paginator.page_range %}
|
|
|
|
<span class="ib" style="background: {% if p == msgs.number %}white{% endif %}; margin: 0;"><a href="?page={{ p }}">{{ p }}</a></span>
|
2017-03-12 19:24:16 +00:00
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
|
|
|
|
{% for m in msgs %}
|
2017-02-25 13:37:45 +00:00
|
|
|
{% if m.id == first_unread_message_id %}
|
|
|
|
<span id="first_unread"></span>
|
|
|
|
{% endif %}
|
2017-02-24 16:22:13 +00:00
|
|
|
{% if m.id >= first_unread_message_id %}
|
|
|
|
{{ display_message(m, user, True) }}
|
|
|
|
{% else %}
|
|
|
|
{{ display_message(m, user, False) }}
|
|
|
|
{% endif %}
|
2017-01-21 02:42:06 +00:00
|
|
|
{% endfor %}
|
2017-02-24 16:22:13 +00:00
|
|
|
|
2018-02-22 21:19:17 +00:00
|
|
|
<p><a class="ib button" href="{{ url('forum:new_message', topic_id=topic.id) }}">{% trans %}Reply{% endtrans %}</a></p>
|
2017-03-12 19:24:16 +00:00
|
|
|
|
|
|
|
<p style="text-align: right; background: #d8e7f3;">
|
2017-03-15 17:34:22 +00:00
|
|
|
{% for p in msgs.paginator.page_range %}
|
|
|
|
<span class="ib" style="background: {% if p == msgs.number %}white{% endif %}; margin: 0;"><a href="?page={{ p }}">{{ p }}</a></span>
|
2017-03-12 19:24:16 +00:00
|
|
|
{% endfor %}
|
|
|
|
</p>
|
2017-05-20 10:40:30 +00:00
|
|
|
</div>
|
2017-01-21 02:42:06 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|