X-Git-Url: https://plomlompom.com/repos/condition_titles?a=blobdiff_plain;f=todo_templates%2Ftodo.html;h=5aaf8a0bd71165ef5b36aeeb50cbe728f44d2f0b;hb=11df024d5f24e8d7916f57c907975ebe27db617f;hp=09aaf452bb260db264624f58b8460113b43695ad;hpb=13a15b95ade73f4455db648b70e1de784c515039;p=misc
diff --git a/todo_templates/todo.html b/todo_templates/todo.html
index 09aaf45..5aaf8a0 100644
--- a/todo_templates/todo.html
+++ b/todo_templates/todo.html
@@ -1,54 +1,269 @@
{% extends 'base.html' %}
+
+
+
{% block css %}
-th, td { vertical-align: top; text-align: left}
-td.input { width: 100%; }
-td.checkbox { width: 0.1em; height: 0.1em; padding: 0em; text-align: center; }
-input[type="number"] { text-align: right; }
-input[type="text"] { width: 100% }
-textarea { width: 100% };
+tr.toplevel th { padding-right: 1em; }
+td.center { text-align: center; }
+tr.toplevel td, tr.toplevel th { padding-top: 1em; }
+tr.lowlevel td, tr.lowlevel th { padding-top: 0em; }
+tr.grey td { background-color: #cccccc; }
{% endblock %}
+
+
+
+{% macro draw_todo(todo) %}{{todo.title}}{% if todo.comment %}({{todo.comment|e}}){% endif %}{% endmacro %}
+
+
+
+{% macro task_with_deps(task, indent) %}
+{% for i in range(indent) %} {% endfor %}+
+({{task.title.then}})
+{% for t in task.deps %}
+{{ task_with_deps(t, indent+1) }}
+{% endfor %}
+{% endmacro %}
+
+
+
+{% macro todo_with_deps(todo, indent) %}
+{% for i in range(indent) %} {% endfor %}{{ macros.doneness_string(todo) }} {{ draw_todo(todo) }}
+{% for dep in todo.deps %}
+{% if dep.been_observed %}
+{% for i in range(indent+1) %} {% endfor %}{{ macros.doneness_string(dep) }} ({{ draw_todo(dep) }})
+{% else %}
+{{ todo_with_deps(dep, indent+1) }}
+{% endif %}
+{% endfor %}
+{{ todo.observe() }}
+{% endmacro %}
+
+
+
+{% macro draw_deps(deps) %}
+{% for t in deps %}
+