50 lines
1.2 KiB
HTML
50 lines
1.2 KiB
HTML
{% extends "base/base.html" %}
|
|
{% import "widgets/editor.html" as widget_editor %}
|
|
|
|
{% block title %}
|
|
<a href='/forum'>Forum de Planète Casio</a> » <h1>{{ f.name }}</h1>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<section>
|
|
<p>{{ f.descr }}</p>
|
|
|
|
{% if f.topics %}
|
|
<table class=topiclist>
|
|
<tr><th>Sujet</th><th>Auteur</th><th>Date de création</th>
|
|
<th>Commentaires</th><th>Vues</th></tr>
|
|
|
|
{% for t in f.topics %}
|
|
<tr><td>{{ t.title }}</td>
|
|
<td><a href='/user/{{ t.author.norm }}'>{{ t.author.name }}</a></td>
|
|
<td>{{ t.date_created | date }}</td>
|
|
<td>{{ t.comments | length }}</td>
|
|
<td>{{ t.views }} </td></tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% else %}
|
|
<p>Il n'y a aucun topic sur ce forum ! Animons-le vite !</p>
|
|
{% endif %}
|
|
<div class=form>
|
|
|
|
<h2>Créer un nouveau sujet</h2>
|
|
|
|
<form action="" method="post" enctype="multipart/form-data">
|
|
{{ form.hidden_tag() }}
|
|
|
|
<div>
|
|
{{ form.title.label }}
|
|
{{ form.title() }}
|
|
{% for error in form.title.errors %}
|
|
<span class="msgerror">{{ error }}</span>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{{ widget_editor.editor(form.message) }}
|
|
|
|
<div>{{ form.submit(class_='bg-green') }}</div>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|