{% import "widgets/user.html" as widget_user %}
{% import "widgets/attachments.html" as widget_attachments %}
{# Post actions: this widget expands to a context menu with actions controlling
a post, supporting different types of posts. #}
{% macro post_actions(post) %}
{# TODO (Guest edit): determine permissions in post_actions widget #}
{% set auth = current_user.is_authenticated %}
{% set can_edit = auth and current_user.can_edit_post(post) %}
{% set can_delete = auth and current_user.can_delete_post(post) %}
{% set can_punish = auth and current_user.can_punish_post(post) %}
{% set can_topcomm = auth and current_user.can_set_topcomment(post) %}
{% set can_move = auth and current_user.can_edit_post(post) and post.type == "comment" %}
{% if post.type == "topic" %}
{% set suffix = " le sujet" %}
{% elif post.type == "program" %}
{% set suffix = " le programme" %}
{% endif %}
{% if can_edit or can_move or can_delete or can_punish or can_topcomm %}
⋮
{{ widget_user.profile(c.author) }} | |
Le commentaire à cet endroit est actuellement utilisé comme en-tête. |
{{ widget_user.profile(leader.author) }} |