2017-02-24 16:22:13 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
2018-12-05 17:18:24 +00:00
|
|
|
{% from 'forum/macros.jinja' import display_message, display_search_bar %}
|
2017-02-24 16:22:13 +00:00
|
|
|
|
|
|
|
{% block title %}
|
2017-04-12 17:19:25 +00:00
|
|
|
{% if topic %}
|
2017-02-24 16:22:13 +00:00
|
|
|
{% trans %}Reply{% endtrans %}
|
2017-04-12 17:19:25 +00:00
|
|
|
{% else %}
|
|
|
|
{% trans %}New topic{% endtrans %}
|
|
|
|
{% endif %}
|
2017-02-24 16:22:13 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2017-04-12 17:19:25 +00:00
|
|
|
{% if topic %}
|
2018-12-12 15:54:19 +00:00
|
|
|
{{ display_search_bar(request) }}
|
2017-02-24 16:22:13 +00:00
|
|
|
<p>
|
|
|
|
<a href="{{ url('forum:main') }}">{% trans %}Forum{% endtrans %}</a>
|
|
|
|
{% for f in topic.forum.get_parent_list() %}
|
|
|
|
> <a href="{{ f.get_absolute_url() }}">{{ f }}</a>
|
|
|
|
{% endfor %}
|
|
|
|
> <a href="{{ topic.forum.get_absolute_url() }}">{{ topic.forum }}</a>
|
|
|
|
> <a href="{{ topic.get_absolute_url() }}">{{ topic }}</a>
|
|
|
|
</p>
|
2017-06-02 06:47:47 +00:00
|
|
|
<div id="forum">
|
|
|
|
<h3>{{ topic.title }}</h3>
|
|
|
|
<h4>{% trans %}Reply{% endtrans %}</h4>
|
2017-06-10 17:39:40 +00:00
|
|
|
{% else %}
|
|
|
|
<div id="forum">
|
2017-06-02 06:47:47 +00:00
|
|
|
<h4>{% trans %}New topic{% endtrans %}</h4>
|
2017-06-10 17:39:40 +00:00
|
|
|
{% endif %}
|
2017-06-02 06:47:47 +00:00
|
|
|
<form action="" method="post" enctype="multipart/form-data">
|
|
|
|
{% csrf_token %}
|
2017-06-10 17:55:33 +00:00
|
|
|
{{ form.as_p() }}
|
2017-06-02 06:47:47 +00:00
|
|
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
|
|
|
</form>
|
|
|
|
<hr>
|
2017-02-24 16:22:13 +00:00
|
|
|
|
2017-06-02 06:47:47 +00:00
|
|
|
{% if topic %}
|
|
|
|
{% for m in topic.messages.select_related('author__avatar_pict').order_by('-id')[:10] %}
|
|
|
|
{{ display_message(m, user) }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
2017-02-24 16:22:13 +00:00
|
|
|
|
|
|
|
{% endblock %}
|