{#- The comment box of the task dialog and the task page. Outside every fragment that live events refetch (_task_view.html, _comment_thread.html), so a half-typed comment is never swapped away; the thread above it refetches itself. A card without comments folds the box into "Add comment". Expects: t (the task), detail. -#} {%- set empty = not detail.comments %} <{{ "details" if empty else "section" }} class="panel{% if empty %} fold{% endif %} comment-box comments"{% if empty %} data-fold="add-comment"{% else %} aria-labelledby="comments-title-{{ t.key }}"{% endif %}> {#- The conversation sits right above the box, like a messenger: what you send shows at once. #} {% if empty %}

Add comment

{% else %}

Comments

{% endif %} {% with comments = detail.comments, doc_refs = detail.doc_refs, wait_reason = detail.undelivered %}{% include "_comment_thread.html" %}{% endwith %}