{% comment %} One comment. Needs `c` (prepared by intent.comments.presenters), `thread`, `project`, `focus`. Forms post normally; with HTMX they swap the whole thread (`thread.dom_id`) in place. {% endcomment %} {% with by=c.author.username|default:"ghost" comment_id="comment-"|add:c.pk %}
{{ by }} {% if c.edited_at and not c.is_deleted %} · edited (see earlier versions of {{ by }}’s comment) {% endif %}
{% if c.is_deleted %}

Comment deleted.

{% else %}
{{ c.html }}
{% endif %} {% if c.can_edit or c.can_delete %}
{% if c.can_edit %} {% url 'comments:edit' org_slug=project.org.slug project_slug=project.slug comment_id=c.pk as edit_url %}
Edit {{ by }}’s comment
{% csrf_token %}
{% endif %} {% if c.can_delete %} {% url 'comments:delete' org_slug=project.org.slug project_slug=project.slug comment_id=c.pk as delete_url %} {# A disclosure rather than a script confirm, so the second step works without JS. #}
Delete {{ by }}’s comment
{% csrf_token %}

The text and its edit history will be removed. This can't be undone.

{% endif %}
{% endif %}
{% endwith %}