{% load humanize %}{% comment %} The sequence table. Rendered both inside list.html and on its own for every HTMX refresh โ€” one renderer, so a filtered view and a post-mutation refresh can never disagree about what a row looks like. {% endcomment %} {% if not sequences %} {% if query or filters.status %} {% include "components/empty_state.html" with icon="search" title="No sequences match" body="Nothing matches these filters. Try a different word, or clear them." action_label="Clear filters" action_click="clearFilters()" %} {% else %} {% include "components/empty_state.html" with icon="sequences" title="No sequences here yet" body="Create one above, add a step, then subscribe contacts from a flow, a rule or the contact list." %} {% endif %} {% else %} {% comment %} A table, because a sequence's numbers are columns you compare down the page (HANDOFF ยง3): its shape in step dots, who is on it now, how many reach the end, and its status. Each sequence is its own so the row and its inline rename share one Alpine scope. {% endcomment %}
{% for sequence in sequences %} {% if can_edit %} {% endif %} {% endfor %}
Sequence Steps Active Completion Status Actions
{{ sequence.name }}

Updated {{ sequence.updated_at|naturaltime }}

{% if sequence.step_count %} {% endif %} {{ sequence.step_count }} step{{ sequence.step_count|pluralize }} {{ sequence.subscriber_count }} {% if sequence.enrolled_count %} {% widthratio sequence.completed_count sequence.enrolled_count 100 as percent %}

{{ percent }}% complete

{% else %}

Nobody yet

{% endif %}
{% if sequence.status == "active" %} {% include "components/status_pill.html" with tone="success" label="Active" %} {% elif sequence.status == "archived" %} Archived {% else %} {% include "components/status_pill.html" with tone="neutral" label="Draft" %} {% endif %} {% if can_edit %}Open{% else %}View{% endif %} {% if can_edit %} {% endif %}
{% csrf_token %}
{% endif %}