{% extends "community/_base.html" %} {%- from "macros/box.html" import m_box_content, m_box_menu %} {% from "macros/form.html" import m_field %} {%- block content %} {%- set is_manager = g.community.has_permission(current_user, 'manage') %} {# TODO #}

{{ _("Back to conversation list") }}

{%- set author_href = url_for("social.user", user_id=thread.creator.id) %}
{{ thread.creator }}
{{ thread.created_at | datetimeformat }}

{{ thread.title }}


{%- set post = thread.posts[0] %} {{ post.body_html|safe }} {%- if post.attachments %}
{%- endif %} {%- if thread.posts|length > 1 %}

Comments

{%- for post in thread.posts[1:] %} {{ m_post(post) }} {%- endfor %}
{%- endif %}

{{ _("Post a comment") }}

{{ form.csrf_token }} {{ m_field(form.message, class_="resizeable-vertical", rows=10) }} {{ m_field(form.attachments) }} {%- if g.community.type == 'participative' or is_manager %} {{ m_field(form.send_by_email) }} {%- endif %}
{%- endblock %} {%- macro m_post(post) %} {%- set author_href = url_for("social.user", user_id=post.creator.id) %} {%- set author_img = user_photo_url(post.creator, size=45) %}
{{ post.creator }}, {{ post.created_at | datetimeformat }}
{{ post.body_html|safe }}
{%- if post.attachments %}
{%- endif %}
{%- endmacro %} {%- block sidebar %} {%- call m_box_menu() %} {%- endcall %} {%- endblock %} {%- block modals %} {%- endblock %}