{% extends 'pipeline/base.html' %} {% load i18n %} {% block page_title %}{{ page_title }}{% endblock %} {% block pipeline_content %}
{# ── Header ───────────────────────────────────────────────────────────── #}

{{ page_title }}

{{ flow.description|default:"" }}
{# ── Summary cards ────────────────────────────────────────────────────── #}
{{ total_assigned }}
{% trans "Assigned" %}
{{ total_in_progress }}
{% trans "In Progress" %}
{{ total_completed }}
{% trans "Completed" %}
{# ── Active/All toggle ────────────────────────────────────────────────── #}
{% if show_completed %} {% trans "All Assignments" %} {% else %} {% trans "Active Assignments" %} {% endif %}
{% if show_completed %} {% trans "Show Active Only" %} {% else %} {% trans "Show All (incl. Completed)" %} {% endif %}
{# ── Step legend ──────────────────────────────────────────────────────── #} {% if steps %}
{% trans "Steps:" %} {% for step in steps %} {{ forloop.counter }} {{ step.name }} {% if step.optional %}({% trans "optional" %}){% endif %} {% endfor %}
{% endif %} {# ── Assignments table ────────────────────────────────────────────────── #} {% if rows %}
{% for step in steps %} {% endfor %} {% for row in rows %} {% with a=row.assignment %} {# User #} {# Status badge #} {# Progress bar #} {# Assigned at #} {# Per-step icons #} {% for state in row.step_states %} {% endfor %} {% endwith %} {% endfor %}
{% trans "User" %} {% trans "Status" %} {% trans "Progress" %} {% trans "Assigned" %} {{ forloop.counter }}
{{ a.user.username }} {% with main=a.user.profile.main_character %} {% if main %} {{ main.character_name }} {% endif %} {% endwith %} {% if a.status == 'assigned' %} {% trans "Assigned" %} {% elif a.status == 'in_progress' %} {% trans "In Progress" %} {% else %} {% trans "Completed" %} {% endif %}
{{ row.completed_required }}/{{ row.total_required }}
{{ a.assigned_at|timesince }} {% trans "ago" %} {% if state.complete %} {% else %} {% if state.step.optional %} {% else %} {% endif %} {% endif %}
{% else %}
{% if show_completed %}

{% trans "No assignments for this flow yet." %}

{% else %}

{% trans "No active assignments right now." %}

{% trans "Show Completed Assignments" %} {% endif %}
{% endif %}
{% endblock %}