{% import "widgets/user.html" as widget_user %} {% import "widgets/attachments.html" as widget_attachments %} {% macro thread(comments, top_comment) %} {% if top_comment == None %} {% endif %} {% for c in comments %} {% if c != top_comment %} {% elif loop.index0 != 0 %}
Ce message est le top comment
{% endif %} {% endfor %}
{{ widget_user.profile(c.author) }}
{% if c.date_created != c.date_modified %} {% endif %} {# TODO: Let guests edit their posts #} {% set can_edit = current_user.is_authenticated and current_user.can_edit_post(c) %} {% set can_delete = current_user.is_authenticated and current_user.can_delete_post(c) %} {% set can_punish = current_user.is_authenticated and current_user.priv("delete.posts") %} {% if can_edit or can_delete or can_punish %}
{% if can_edit %} Modifier {% endif %} {% if can_punish %} Supprimer (normal) Supprimer (pénalité) {% elif can_delete %} Supprimer {% endif %}
{% endif %}
{{ c.text|md }} {{ widget_attachments.attachments(c) }} {% if c.author.signature %}
{{ c.author.signature|md }} {% endif %}
{% endmacro %}