PCv5/app/templates/programs/program.html

72 lines
2.2 KiB
HTML

{% extends "base/base.html" %}
{% import "widgets/editor.html" as widget_editor %}
{% import "widgets/thread.html" as widget_thread with context %}
{% import "widgets/user.html" as widget_user %}
{% import "widgets/pagination.html" as widget_pagination with context %}
{% import "widgets/attachments.html" as widget_attachments %}
{% block title %}
<h1>Programme: {{ p.name }}</h1>
{% endblock %}
{% block content %}
<section>
{% if p.thread.top_comment %}
{% call widget_thread.thread_leader(p.thread.top_comment) %}
<div class="info">
<div>Posté le {{ p.date_created | dyndate }}</div>
{{ widget_thread.post_actions(p) }}
</div>
<h1>{{ p.name }}</h1>
Infos infos infos
<hr>
{{ p.thread.top_comment.text | md }}
{{ widget_attachments.attachments(p.thread.top_comment) }}
{% endcall %}
{% endif %}
{{ widget_pagination.paginate(comments, 'program_view', p) }}
{{ widget_thread.thread(comments.items, p.thread.top_comment) }}
{{ widget_pagination.paginate(comments, 'program_view', p) }}
{% if V5Config.ENABLE_GUEST_POST or current_user.is_authenticated %}
<div class=form>
<h3>Commenter le programme</h3>
<form action="" method="post" enctype="multipart/form-data">
{{ form.hidden_tag() }}
{% if form.pseudo %}
<div>
{{ form.pseudo.label }}
{{ form.pseudo }}
{% for error in form.pseudo.errors %}
<span class="msgerror">{{ error }}</span>
{% endfor %}
{{ form.ab }}
</div>
{% endif %}
{{ widget_editor.text_editor(form.message, label=False) }}
<div>
{{ form.attachments.label }}
<div>
{{ form.attachments }}
{% for error in form.attachments.errors %}
<span class="msgerror">{{ error }}</span>
{% endfor %}
</div>
</div>
<div>{{ form.submit(class_='bg-ok') }}</div>
</form>
</div>
{% endif %}
{% endblock %}