{#- The polled regions of the task page. Each is rendered in place, and again with hx-swap-oob by _task_live.html. -#} {% from "macros.html" import actor, badges, csrf_field, icon, tile with context %} {% macro poller(oob=False) -%}
{%- endmacro %} {% macro head(oob=False) -%}
{{ task.ref }} {{ task.column.name }} {% if task.archived %}archived{% endif %} {% if gate_note %}{{ gate_note }}{% endif %}
{{ csrf_field() }}

{{ task.title }}

{%- endmacro %} {% macro event_line(e) -%} {%- set p = e.payload -%}{%- set who = "@" ~ e.actor.handle -%} {%- if e.type == "task.moved" and p.gate == "signed_off" -%}Signed off by {{ who }} {%- elif e.type == "task.moved" and p.gate == "approved" -%}Approved by {{ who }} {%- elif e.type == "task.moved" -%}Moved to {{ p.to }} by {{ who }} {%- elif e.type == "task.created" -%}Created in {{ p.column }} by {{ who }} {%- elif e.type == "task.claimed" -%}Claimed by {{ who }}{% if p.label %} · {{ p.label }}{% endif %} {%- elif e.type == "task.released" -%}Claim released{% if p.reason %}: {{ p.reason }}{% endif %} {%- elif e.type == "task.assigned" -%}{% if p.assignee %}Assigned to @{{ p.assignee }}{% else %}Unassigned{% endif %} by {{ who }} {%- elif e.type == "task.updated" -%}Edited {{ (p.fields or []) | join(", ") | replace("_md", "") }} · {{ who }} {%- elif e.type == "comment.added" and p.kind == "question" -%}Question from {{ who }} {%- elif e.type == "comment.added" -%}Comment from {{ who }} {%- else -%}{{ e.summary }} {%- endif -%} {%- endmacro %} {% macro facts(oob=False) -%}
Status
{{ task.column.name }}
Assignee
{% if task.assignee %}{{ tile(task.assignee) }}@{{ task.assignee.handle }}{{ badges(task.assignee) }}{% else %}Unassigned{% endif %}
Claim
{% if task.claimed_by %}@{{ task.claimed_by.handle }} · {{ task.claim_label }} · {{ task.claimed_at | ago }}
{{ csrf_field() }}
{% else %}Not claimed{% endif %}
Labels
{% for l in task.labels %}{{ l }}{% else %}None{% endfor %}
Created
{{ task.created_at | day }} by @{{ task.created_by.handle }}
Updated
{{ task.updated_at | day }} by @{{ task.updated_by.handle }} · v{{ task.version }}
Edit title, assignee, labels and dependencies
{{ csrf_field() }}
{% if task.blocked_by %} Blocked by {% for b in task.blocked_by %} {% if b.closed %}{{ icon("done") }}{% else %}{% endif %} {{ b.ref }} · {{ b.column }}{% if b.satisfied and not b.closed %}, handed in{% elif not b.satisfied %}, open{% endif %}{{ b.title }} {% endfor %} {% endif %} {% if blocking %} Blocks {% for b in blocking %} {{ b.ref }} · {{ b.column.name }}{{ b.title }} {% endfor %} {% endif %} {% if not task.blocked_by and not blocking %}

No dependencies.

{% endif %}
{%- endmacro %} {% macro thread(oob=False) -%}
{% for c in comments %}
{{ tile(c.author, True) }}
@{{ c.author.handle }}{{ badges(c.author) }} {% if c.session_label %}{{ c.session_label }}{% endif %} {% if c.edited_at %} (edited){% endif %} {% if c.kind == "question" %} Question{% if not (question and question.id == c.id) %}{{ icon("check") }}Answered{% endif %} {% endif %}
{% if c.deleted %}

[deleted]

{% else %}
{{ md(c.body_md) }}
{% endif %}
History {% if me and c.author.handle == me.handle and not c.deleted %}
Edit
{{ csrf_field() }}
{% endif %} {% if me and (c.author.handle == me.handle or me.role == "admin") %}
{{ csrf_field() }} {% if c.deleted %}{% else %}{% endif %}
{% endif %}
{% else %}

No comments yet.

{% endfor %}
{%- endmacro %} {% macro activity_panel(oob=False) -%}

Activity

    {% for e in activity %}
  1. {{ event_line(e) }}
  2. {% endfor %}
{%- endmacro %} {% macro attachments_panel(oob=False) -%}

Attachments

{%- endmacro %}