-
{{ task.content | markdown | safe }}
- {% if task.description %}
-
{{ task.description | markdown | safe }}
- {% endif %}
-
- {% set meta_fields = [] %}
- {% if task.id is not none %}
- {% set _ = meta_fields.append('ID: ' ~ task.id) %}
- {% endif %}
- {% if task.due and task.due.date %}
- {% set due_dt = task.due.date %}
- {% if due_dt.__class__.__name__ == 'datetime' or due_dt.__class__.__name__ == 'date' %}
- {% set due_fmt = due_dt.strftime('%Y-%m-%d %H:%M') if due_dt.__class__.__name__ == 'datetime' else due_dt.strftime('%Y-%m-%d 00:00') %}
- {% else %}
- {% set due_str = due_dt|string %}
- {% if 'T' in due_str %}
- {% set due_fmt = due_str[:16].replace('T', ' ') %}
- {% else %}
- {% set due_fmt = due_str %}
- {% endif %}
- {% endif %}
- {% set _ = meta_fields.append('Due: ' ~ due_fmt) %}
- {% endif %}
- {% if task.due and task.due.is_recurring %}
- {% if task.due.string %}
- {% set _ = meta_fields.append('Recurring: ' ~ task.due.string) %}
- {% endif %}
- {% endif %}
- {% if task.priority is not none %}
- {% set _ = meta_fields.append('Priority: ' ~ task.priority) %}
- {% endif %}
{% if task.completed_at %}
{% if task.completed_at.__class__.__name__ == 'datetime' or task.completed_at.__class__.__name__ == 'date' %}
{% set completed_fmt = task.completed_at.strftime('%Y-%m-%d') %}
@@ -146,7 +191,10 @@
{% set _ = meta_fields.append('Completed: ' ~ completed_fmt) %}
{% endif %}
{{ meta_fields|join(' | ') }}
-
+
+ {% if task.parent_task %}
+
Parent task: {{ task.parent_task.content | markdown | safe }}
+ {% endif %}
{% if task.attachments %}
Attachments:
@@ -159,15 +207,31 @@
{% endif %}
{% if task.comments %}
{% endif %}
+ {% else %}
+
No completed tasks in this period.
{% endfor %}
+ {% for comment in task.comments %} +-
+ {{ comment.content | markdown | safe }}
+ ({{ comment.posted_at }})
+ {% set attachment = comment.attachment %}
+ {% if attachment and (attachment.local_file or attachment.file_url) %}
+
+ Attachment:
+ {% if attachment.local_file %}
+ {{ attachment.file_name or attachment.local_file }}
+ {% elif attachment.file_url %}
+ {{ attachment.file_name or attachment.file_url }}
+ {% endif %}
+
+ {% endif %}
+
+ {% endfor %}
+
+