{% macro badges(a) -%} {%- if a.kind == "agent" %} agent{% if a.role == "admin" %} admin{% endif %}{% elif a.role == "admin" %} owner{% endif -%} {%- endmacro %} {% macro tile(a, big=False) -%} {%- endmacro %} {% macro actor(a) -%} {%- if a -%}@{{ a.handle }}{{ badges(a) }}{%- else -%}unassigned{%- endif -%} {%- endmacro %} {% macro csrf_field() -%}{%- endmacro %} {% macro editor(name, value, upload_ref=None, rows=12, label=None, write="Edit", focus=False) -%}
{% if upload_ref %}
Markdown supported; paste or drop files {{ caller() if caller else "" }}
{% endif %}
{%- endmacro %} {% macro error_box(error, conflict=False, url="") -%} {% if error %}{% endif %} {%- endmacro %} {% macro icon(name) -%} {%- if name == "lock" -%} {%- elif name == "doc" -%} {%- elif name == "comment" -%} {%- elif name == "check" -%} {%- elif name == "done" -%} {%- elif name == "plus" -%} {%- elif name == "search" -%} {%- elif name == "back" -%} {%- elif name == "down" -%} {%- elif name == "more" -%} {%- elif name == "upload" -%} {%- endif -%} {%- endmacro %} {% macro project_head(project, active) -%}
{{ project.key }}

{{ project.name }}{% if project.archived %} archived{% endif %}

{% if caller %}
{{ caller() }}
{% endif %}
{%- endmacro %} {#- The header's right side on the board and task pages: the repository and the "New task" popover, which creates in the first column. -#} {% macro project_actions(project) -%} {% if project.repo_url and project.repo_url.startswith(("http://", "https://")) %} Repository ↗ {% elif project.repo_url %}{{ project.repo_url }}{% endif %} {% if not project.archived and project.columns %} {% endif %} {%- endmacro %} {% macro swap(url) -%} href="{{ url }}" hx-get="{{ url }}" hx-target="#board-area" hx-select="#board-area" hx-swap="outerHTML" hx-push-url="true" {%- endmacro %} {#- The assignee row as a menu button (HOG-35). `where` keeps ids unique between the card and the panel. -#} {% macro assignee_menu(t, agents, where) -%} {%- set menu_id = "assign-" ~ where ~ "-" ~ t.ref -%}
{%- endmacro %}