{% extends "base.html" %} {% block content %}

{{ item.title }}

{% if item.status not in ['done', 'cancelled'] %} {% if running_task_id and item.id|string == running_task_id %}
{% else %}
{% endif %} {% endif %} Edit
{{ item.status|replace('_', ' ') }} P{{ item.priority }} {% if domain %}{{ domain.name }}{% endif %} {% if project %}{{ project.name }}{% endif %} {% if item.due_date %}Due: {{ item.due_date }}{% endif %} {% if item.context %}@{{ item.context }}{% endif %} {% if item.estimated_minutes %}~{{ item.estimated_minutes }}min{% endif %} {% if item.energy_required %}Energy: {{ item.energy_required }}{% endif %}
{% if item.description %}
{{ item.description }}
{% endif %} {% if item.tags %}
{% for tag in item.tags %}{{ tag }}{% endfor %}
{% endif %}
Overview{% if counts.overview %} ({{ counts.overview }}){% endif %} Notes{% if counts.notes %} ({{ counts.notes }}){% endif %} Links{% if counts.links %} ({{ counts.links }}){% endif %} Files{% if counts.files %} ({{ counts.files }}){% endif %} Lists{% if counts.lists %} ({{ counts.lists }}){% endif %} Decisions{% if counts.decisions %} ({{ counts.decisions }}){% endif %} Processes Contacts{% if counts.contacts %} ({{ counts.contacts }}){% endif %}
{% if tab == 'overview' %} {% if parent %}
Parent Task
{{ parent.title }}
{% endif %}

Subtasks{{ subtasks|length }}

+ Add Subtask
{% for sub in subtasks %}
{{ sub.title }} {{ sub.status|replace('_', ' ') }}
{% else %}
No subtasks
{% endfor %}
{% elif tab == 'notes' %} + New Note {% for n in tab_data %}
{{ n.title }} {{ n.updated_at.strftime('%Y-%m-%d') if n.updated_at else '' }}
{% else %}
No notes linked to this task
{% endfor %} {% elif tab == 'links' %} + New Link {% for w in tab_data %}
{{ w.label }} {{ w.url[:50] }}{% if w.url|length > 50 %}...{% endif %}
{% else %}
No links linked to this task
{% endfor %} {% elif tab == 'files' %} + Upload File {% for f in tab_data %}
{{ f.original_filename }} {{ f.created_at.strftime('%Y-%m-%d') if f.created_at else '' }}
{% else %}
No files attached to this task
{% endfor %} {% elif tab == 'lists' %} + New List {% for l in tab_data %}
{{ l.name }} {{ l.item_count }} items
{% else %}
No lists linked to this task
{% endfor %} {% elif tab == 'decisions' %} + New Decision {% for d in tab_data %}
{{ d.title }} {{ d.status }}
{% else %}
No decisions linked to this task
{% endfor %} {% elif tab == 'processes' %}
Process management coming soon
{% elif tab == 'contacts' %}
{% for c in tab_data %}
{{ c.first_name }} {{ c.last_name or '' }} {% if c.role %}{{ c.role }}{% endif %} {{ c.linked_at.strftime('%Y-%m-%d') if c.linked_at else '' }}
{% else %}
No contacts linked to this task
{% endfor %} {% endif %}
Created {{ item.created_at.strftime('%Y-%m-%d %H:%M') if item.created_at else '' }} {% if item.completed_at %} | Completed {{ item.completed_at.strftime('%Y-%m-%d %H:%M') }}{% endif %}
{% endblock %}