{% extends "base.html" %} {# The packet's plan as a tree, and the versions of it (docs/plan-tree.md). #} {% set q = e.name|urlencode %} {% set base = "/p/" ~ q ~ "/" ~ pl.wpid %} {% macro href(v=None, changes=None, open=None, detail=pl.detail) -%} ?{{ ("v=" ~ v|urlencode ~ "&") if v }}{{ "changes=1&" if changes }}{{ "detail=1&" if detail }}{{ ("open=" ~ open) if open }} {%- endmacro %} {% block title %}plan · {{ pl.short }} · {{ e.name }}{% endblock %} {% block crumbs %}/ {{ e.name }} / {{ pl.short }} / plan{% endblock %} {% block head %} {% endblock %} {% macro row(n) -%} {% if n.kind == "group" %}{{ n.text|inline }}{% else %}{{ MARK.get(n.state, "○") }}{% if n.id %}{{ n.id }}{% endif %}{{ (n.lead or n.text)|inline }}{% if pl.detail and n.tail %} — {{ n.tail|inline }}{% endif %}{% endif %} {%- if n.change == "new" %}new{% elif n.change == "state" %}was {{ n.was }}{% elif n.change == "edited" %}edited{% endif %} {%- set d, t = n.count %}{% if t %}{{ d }}/{{ t }}{% endif %} {%- if n.steps %}step{{ "s" if n.steps|length > 1 }} {% for s in n.steps %}{{ s.n }}{% if s.outcome == "failed" %}✗{% endif %}{{ " " if not loop.last }}{% endfor %}{% endif %} {%- if n.cost %}{{ n.cost|money }}{% endif %} {%- if n.id and n.id in pl.notes %}notes{% endif %} {%- if pl.detail and n.date %}{{ n.date }}{% endif %} {%- if n.said %}{{ n.said|truncate(160) }}{% endif %} {%- endmacro %} {% macro node(n) -%} {% if not pl.changes or n.change or n.changed %} {% set cls = ("pt-" ~ n.kind ~ " " ~ (n.state or "") ~ (" cur" if n.current else ""))|trim %} {% if n.children or (pl.detail and n.details) or n.notes %}
{{ row(n) }}
{% if pl.detail and n.details %}{% endif %} {% for t in n.notes %}
{{ t|inline }}
{% endfor %} {% for c in n.children %}{{ node(c) }}{% endfor %}
{% else %}
{{ row(n) }}
{% endif %} {% endif %} {%- endmacro %} {% block main %} {% if not pl.versions %}

Plan

No outline yet: a packet's plan is state/outline.md, a Markdown checklist (- [ ] 1 ...).

{% else %} {% set d, t = pl.done %}

{{ pl.tree.title|inline if pl.tree.title else "Plan" }}

{{ d }} of {{ t }} done {{ pl.v.label }}{% if pl.v.step and pl.v.dir %} · step {{ pl.v.step }}{% endif %}{% if pl.v.item %} · item {{ pl.v.item }}{% endif %} {% if pl.current %}now: {{ pl.current.id or "" }} {{ (pl.current.lead or pl.current.text)|truncate(60) }}{% endif %} expand all · collapse all · {% if pl.detail %}titles only{% else %}show detail{% endif %} · {% if pl.changes %}whole plan{% else %}changes only{% endif %} {% if pl.latest %}outline.md{% endif %}
{% if t %}
{% endif %}
{% for t in pl.tree.notes %}
{{ t|inline }}
{% endfor %} {% for c in pl.tree.children %}{{ node(c) }}{% endfor %} {% if pl.changes and not pl.tree.changed %}

Nothing changed in this version{% if pl.gone %} but removals{% endif %}.

{% endif %}
{% if pl.gone %}

Removed in this version

{% endif %} {% if pl.children %}

Children

{% for c in pl.children %}
{{ c.short }} {{ c.state }}{% if c.done[1] %}{{ c.done[0] }}/{{ c.done[1] }}{% endif %}
{% if c.tree %}{% for k in c.tree.children %}{{ node(k) }}{% endfor %}{% else %}

No outline.

{% endif %}
{% endfor %} {% endif %}
{% endif %} {% endblock %}