PCv5/app/templates/forum/topic.html

55 lines
1.8 KiB
HTML
Raw Normal View History

{% extends "base/base.html" %}
{% import "widgets/editor.html" as widget_editor %}
{% import "widgets/thread.html" as widget_thread %}
{% import "widgets/user.html" as widget_user %}
{% import "widgets/pagination.html" as widget_pagination with context %}
{% block title %}
<a href='/forum'>Forum de Planète Casio</a> » <a href="{{ url_for('forum_page', f=t.forum) }}">{{ t.forum.name }}</a> » <h1>{{ t.title }}</h1>
{% endblock %}
{% block content %}
<section>
<h1>{{ t.title }}</h1>
{{ widget_thread.thread([t.thread.top_comment], None) }}
{{ widget_pagination.paginate(comments, 'forum_topic', t, {'f': t.forum}) }}
{{ widget_thread.thread(comments.items, t.thread.top_comment) }}
{{ widget_pagination.paginate(comments, 'forum_topic', t, {'f': t.forum}) }}
2021-02-21 20:17:48 +01:00
{% if outdated %}
2021-01-12 16:40:52 +01:00
<div class="bg-warn">
2021-02-21 20:17:48 +01:00
Ce topic est sans activité depuis plus de {{ outdated }} jours, êtes-vous sûr de vouloir y poster ?
2021-01-12 16:40:52 +01:00
</div>
{% endif %}
{% if current_user.is_authenticated or V5Config.ENABLE_GUEST_POST %}
<div class=form>
<h3>Commenter le sujet</h3>
<form action="" method="post" enctype="multipart/form-data">
{{ form.hidden_tag() }}
{% if form.pseudo %}
{{ form.pseudo.label }}
{{ form.pseudo }}
{% for error in form.pseudo.errors %}
<span class="msgerror">{{ error }}</span>
{% endfor %}
{% endif %}
{{ widget_editor.text_editor(form.message, label=False) }}
{{ form.attachments }}
{% for error in form.attachments.errors %}
<span class="msgerror">{{ error }}</span>
{% endfor %}
<div>{{ form.submit(class_='bg-ok') }}</div>
</form>
{% endif %}
</div>
</section>
{% endblock %}