{% extends "base.html" %} {% load common_extras %} {% comment %} Step zero of the import wizard: pick one of the templates this installation ships instead of uploading a file. Nothing is created here either. "Use this template" posts to flows:template_start, which reads the file through the same parse_and_validate an upload uses and lands on the same mapping page — see apps/flows/views_portability.py. The search and category filter are Alpine over the already-rendered cards rather than a second HTMX endpoint. There are around twenty of them, so a round trip per keystroke buys nothing; it also sidesteps the $nextTick trap documented in list.html, which exists only because htmx has to serialise a form first. {% endcomment %} {% block title %}Templates · DemandTrail Messaging{% endblock %} {% comment %} The Templates tab lands here, so the strip it was clicked in has to survive the click — without this block the tab that was just selected, and Flows and Sequences with it, vanish from the page they lead to. {% endcomment %} {% block sub_nav %}{% include "partials/_sub_nav.html" with groups=flow_tab_groups %}{% endblock %} {% comment %} The same header shape as Flows and Sequences — three tabs of one section should not move the title about as you switch between them. "Cancel" is gone: the tab strip above is the way back, and a page you arrived at by a tab has nothing to cancel. {% endcomment %} {% block page_header %} {% endblock %} {% block content %}
{% if errors %} {% endif %} {% if cards %}
{% comment %} The same search + Filter shape as every other list (HANDOFF §2.2), applied in the browser: the popover's model is read by matches() on each card, so there is no form and no reload — its hidden inputs are inert here. {% endcomment %}
{% filter_popover groups=filter_groups noun="template" %}
{% filter_chips groups=filter_groups %}
{% for entry in cards %} {% include "flows/_template_card.html" with searchable=True %} {% endfor %}

Every template arrives as an unpublished draft with its triggers switched off, and its links and tags are placeholders. Nothing runs until you edit it and publish it yourself.

{% else %}

No templates are installed

This installation ships none, or none of them could be read. You can still upload a template file.

{% endif %}
{% endblock %}