X-Git-Url: https://plomlompom.com/repos/?p=misc;a=blobdiff_plain;f=todo_templates%2Ftask.html;fp=todo_templates%2Ftask.html;h=c26d33a9d8d30d7b4c8efebe938b1aed86bc2b4d;hp=7284f1bdc7218f0f85c54f5a6c5d94a6b4c92b84;hb=2ad9f7785539c0cd9f119d1f22b8057fab348114;hpb=59056f396c4761f9cd7ffbc569e3ddf8994d5e83
diff --git a/todo_templates/task.html b/todo_templates/task.html
index 7284f1b..c26d33a 100644
--- a/todo_templates/task.html
+++ b/todo_templates/task.html
@@ -1,11 +1,31 @@
{% extends 'base.html' %}
+
+
{% block css %}
tr.toplevel th { padding-right: 1em; }
tr.toplevel td, tr.toplevel th { padding-top: 1em; }
tr.lowlevel td, tr.lowlevel th { padding-top: 0em; }
{% endblock %}
+
+
+{% macro draw_task(task) %}
+{{task.title.now}}
+{% endmacro %}
+
+
+
+{% macro task_with_deps(task, indent) %}
+{% for i in range(indent) %} {% if loop.last %}+{% endif %}{% endfor %}
+{{ draw_task(task) }}
+{% for task in task.deps %}
+{{ task_with_deps(task, indent+1) }}
+{% endfor %}
+{% endmacro %}
+
+
+
{% block content %}
- + |
-{{subtask.title.now}}
+{% if dep.deps %}
+
+
+{% endif %}
+{% endif %} +{{ draw_task(dep)}} +{% if dep.deps %} ++{% for s in dep.deps %} +{{ task_with_deps(s, 1) }} +{% endfor %} + |