{% extends "base.html" %} {% comment %} Home — the workspace landing page. The redesign turned this from a wall of equal-weight numbers into a page with an order of importance: what still needs setting up, what you could start from, how last week went, and what is waiting on a person. One primary action. `kpis` is None in a deployment with no analytics app, and on a page for someone without `view_analytics`. The figures section is simply absent then rather than rendering as zeros — the same contract the KPI cards had before. The workspace switcher used to live at the bottom of this page. It is in the header now, on every page, which is where somebody looking for it actually goes. {% endcomment %} {% block title %}{{ request.workspace.name }} · DemandTrail Messaging{% endblock %} {% block content %}

{{ greeting }}, {{ request.user.display_name }}

{% comment %} One orange control per screen (HANDOFF §2.1): while setup is unfinished, its next step's button below is the thing to do, so this one steps back to secondary until setup is done. {% endcomment %} {% if can_edit_flows %} {% include "partials/_nav_icon.html" with name="flows" icon_size=16 %} New flow {% endif %}
{% comment %} The setup checklist. Present only while something is unfinished — a permanent "you have done everything" panel is furniture, and this is the one part of the page that should disappear for good. {% endcomment %} {% if setup_incomplete %}

Finish setting up

{{ setup_remaining }} step{{ setup_remaining|pluralize }} left. About five minutes.

{{ setup_done }} of {{ setup_steps|length }}
{% for step in setup_steps %}
{% if step.done %} {{ step.title }} {% else %} {{ step.number }} {{ step.title }} {% endif %}

{% if step.done %}{{ step.done_body }}{% else %}{{ step.body }}{% endif %}

{% comment %} One live call to action, on the current step only. The view marks exactly one step current — the first unfinished one — because the list is ordered by dependency and a flow with no channel has nothing to reply on. Offering all three at once is the thing the redesign set out to stop, and `actionable` drops the link again for a member the page behind it would refuse. {% endcomment %} {% if not step.done and step.current and step.actionable %} {{ step.cta }} {% endif %}
{% endfor %}
{% endif %} {% if flow_templates and can_edit_flows %}

Start from a template

{{ flow_template_total }} ready-made flow{{ flow_template_total|pluralize }}. Pick one and change the words to suit you.

Browse all {{ flow_template_total }}
{% comment %} A form, not a link: picking a template writes a FlowImport row, and a state-changing GET is both CSRF-exposed and prefetchable. It lands on the same review-and-dry-run step an uploaded file does — a shipped template gets no shortcut past validation. {% endcomment %} {% for template in flow_templates %} {% include "flows/_template_tile.html" %} {% endfor %}
{% endif %}
{% if kpis %}

Last 7 days

{% if can_view_analytics %} See insights {% endif %}
{{ kpis.messages_in }}
Messages in
{{ kpis.messages_out }}
Messages out
{{ kpis.contacts_new }}
New contacts
{{ kpis.active_flows }}
Live flows
{% comment %} Bar heights are computed in the view — the template language has no arithmetic, and widthratio's rounding is not worth explaining. A zero week renders flat bars rather than nothing, because "quiet" and "broken" should not look the same. {% endcomment %}
{% for day in kpis.daily_messages %}{{ day.date|date:"D" }}{% endfor %}
{% endif %}

Needs you

{% for item in needs_you %} {% include "partials/_nav_icon.html" with name="bell" icon_size=15 %} {{ item.title }} {{ item.body }} {% empty %}

Nothing is waiting on you.

{% endfor %}
{% endblock %}