{% comment %} A feature or line thread. Needs `thread` (prepared), `project`, `access`, `focus`, `error`. Resolved threads start collapsed. This whole element is what HTMX swaps. {% endcomment %}
{% if error %}

Error: {{ error }}

{% endif %} {% if thread.pin_number %}Pin {{ thread.pin_number }}: {% endif %}Thread by {{ thread.author.username|default:"deleted user" }}, {{ thread.live_count }} comment{{ thread.live_count|pluralize }}{% if thread.promoted_to %}, became issue {{ thread.promoted_to.key }}{% elif thread.is_resolved %}, resolved{% endif %} {% if thread.kind == "line" and thread.outdated %}

On lines {{ thread.line_start }}–{{ thread.line_end }} of revision {{ thread.revision }}, which have changed since:

{{ thread.quoted }}
{% endif %} {% if thread.kind == "image" or thread.kind == "file" %}

{% if thread.kind == "image" %}Pinned at {{ thread.x_pct }}% across, {{ thread.y_pct }}% down{% else %}About the whole file{% endif %}{% if thread.earlier %}, on version {{ thread.file_version.version }}{% endif %}.

{% endif %} {% if thread.promoted_to %}

Continued in issue {{ thread.promoted_to.key }} {{ thread.promoted_to.title }}.

{% endif %} {% for c in thread.comment_list %} {% include "comments/_comment.html" %} {% endfor %} {% if access.can_contribute %} {% url 'comments:reply' org_slug=project.org.slug project_slug=project.slug thread_id=thread.pk as reply_url %}
{% csrf_token %}
{% endif %} {% if thread.can_resolve or thread.can_promote %}
{% if thread.can_resolve %} {% url 'comments:resolve' org_slug=project.org.slug project_slug=project.slug thread_id=thread.pk as resolve_url %}
{% csrf_token %} {% if thread.is_resolved %} {% else %} {% endif %}
{% endif %} {% if thread.can_promote %} Turn into an issue {% endif %}
{% endif %}