task.html

  1{% extends "base.html" %}
  2
  3{% block title %}td — {{ task.title }}{% endblock %}
  4
  5{% block content %}
  6<nav aria-label="Breadcrumb">
  7  <ol class="unstyled hstack">
  8    <li><a href="/" class="unstyled">Projects</a></li>
  9    <li aria-hidden="true">/</li>
 10    <li><a href="/projects/{{ project_name }}" class="unstyled">{{ project_name }}</a></li>
 11    <li aria-hidden="true">/</li>
 12    <li><a href="/projects/{{ project_name }}/tasks/{{ task.full_id }}" class="unstyled" aria-current="page"><strong>{{ task.short_id }}</strong></a></li>
 13  </ol>
 14</nav>
 15
 16<article class="card mt-4">
 17  <header>
 18    <h1>{{ task.title }}</h1>
 19    <span class="badge{% if task.status == "closed" %} success{% elif task.status == "in_progress" %} secondary{% endif %}">{{ task.status }}</span>
 20  </header>
 21
 22  {% if !task.description.is_empty() %}
 23  <p>{{ task.description }}</p>
 24  {% endif %}
 25
 26  <div class="table mt-4">
 27    <table>
 28      <caption class="sr-only">Task metadata</caption>
 29      <tbody>
 30        <tr>
 31          <th scope="row">ID</th>
 32          <td><code>{{ task.short_id }}</code></td>
 33        </tr>
 34        <tr>
 35          <th scope="row">Type</th>
 36          <td>{{ task.task_type }}</td>
 37        </tr>
 38        <tr>
 39          <th scope="row">Priority</th>
 40          <td>{{ task.priority }}</td>
 41        </tr>
 42        <tr>
 43          <th scope="row">Effort</th>
 44          <td>{{ task.effort }}</td>
 45        </tr>
 46        <tr>
 47          <th scope="row">Created</th>
 48          <td><time>{{ task.created_at }}</time></td>
 49        </tr>
 50        <tr>
 51          <th scope="row">Updated</th>
 52          <td><time>{{ task.updated_at }}</time></td>
 53        </tr>
 54      </tbody>
 55    </table>
 56  </div>
 57
 58  {% if !task.labels.is_empty() %}
 59  <section class="mt-4" aria-label="Labels">
 60    <h2>Labels</h2>
 61    <div class="hstack gap-2">
 62      {% for l in task.labels %}
 63      <span class="badge">{{ l }}</span>
 64      {% endfor %}
 65    </div>
 66  </section>
 67  {% endif %}
 68
 69  {% if !blockers_open.is_empty() || !blockers_resolved.is_empty() %}
 70  <section class="mt-4" aria-label="Blockers">
 71    <h2>Blockers</h2>
 72    <ul>
 73      {% for b in blockers_open %}
 74      <li><a href="/projects/{{ project_name }}/tasks/{{ b.full_id }}"><code>{{ b.short_id }}</code></a> <span class="badge warning">open</span></li>
 75      {% endfor %}
 76      {% for b in blockers_resolved %}
 77      <li><a href="/projects/{{ project_name }}/tasks/{{ b.full_id }}"><code>{{ b.short_id }}</code></a> <span class="badge success">resolved</span></li>
 78      {% endfor %}
 79    </ul>
 80  </section>
 81  {% endif %}
 82
 83  {% if !subtasks.is_empty() %}
 84  <section class="mt-4" aria-label="Subtasks">
 85    <h2>Subtasks</h2>
 86    <div class="table">
 87      <table>
 88        <caption class="sr-only">Subtasks of {{ task.title }}</caption>
 89        <thead>
 90          <tr>
 91            <th scope="col">ID</th>
 92            <th scope="col">Status</th>
 93            <th scope="col">Title</th>
 94          </tr>
 95        </thead>
 96        <tbody>
 97          {% for s in subtasks %}
 98          <tr>
 99            <td><a href="/projects/{{ project_name }}/tasks/{{ s.full_id }}"><code>{{ s.short_id }}</code></a></td>
100            <td><span class="badge{% if s.status == "closed" %} success{% elif s.status == "in_progress" %} secondary{% endif %}">{{ s.status }}</span></td>
101            <td>{{ s.title }}</td>
102          </tr>
103          {% endfor %}
104        </tbody>
105      </table>
106    </div>
107  </section>
108  {% endif %}
109
110  {% if !task.logs.is_empty() %}
111  <section class="mt-4" aria-label="Work log">
112    <h2>Work log</h2>
113    {% for log in task.logs %}
114    <details>
115      <summary><time>{{ log.timestamp }}</time></summary>
116      <p>{{ log.message }}</p>
117    </details>
118    {% endfor %}
119  </section>
120  {% endif %}
121</article>
122{% endblock %}