{% extends "community/_base.html" %} {%- from "macros/box.html" import m_box_content, m_box_menu -%} {%- from "macros/form.html" import m_field -%} {%- set is_manager = g.community.has_permission(current_user, 'manage') -%} {%- set author_href = url_for("social.user", user_id=thread.creator.id) -%} {%- set post = thread.posts[0] -%} {%- block content %} {% call m_box_content() %} {# TODO #}

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

{{ thread.title }}

{{ _("Posted by") }} {{ thread.creator }} {{ _("on") }} {{ thread.created_at | datetimeformat }}

{{ post.body_html|safe }} {%- if post.attachments %}
    {%- for attachment in post.attachments %}
  • {{ attachment.name }} ({{ attachment.content_length|filesize }})
  • {%- endfor %}
{%- endif %}
{%- if thread.posts|length > 1 %}

{{ _("Answers and 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 %}
{% endcall %} {%- 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=55) %}
{{ post.creator }}, {{ post.created_at | datetimeformat }}
{{ post.body_html|safe }}
{%- if post.attachments %}
    {%- for attachment in post.attachments %}
  • {{ attachment.name }} ({{ attachment.content_length|filesize }})
  • {%- endfor %}
{%- endif %}
{%- endmacro %} {%- block sidebar %} {%- call m_box_menu() %} {%- endcall %} {%- endblock %} {%- block modals %} {%- endblock %}