X-Git-Url: https://plomlompom.com/repos/new_day?a=blobdiff_plain;ds=sidebyside;f=todo_templates%2Ftodo.html;h=e62a09b8c02547bcfb48dabf7f1b5b73f72163f9;hb=ecee822bebf62049803b90fc8d8a0b484915a0fc;hp=88fa72b2e0ec6fc9afb0abd7b8f89b2ab7b45e70;hpb=59056f396c4761f9cd7ffbc569e3ddf8994d5e83;p=misc
diff --git a/todo_templates/todo.html b/todo_templates/todo.html
index 88fa72b..e62a09b 100644
--- a/todo_templates/todo.html
+++ b/todo_templates/todo.html
@@ -1,12 +1,69 @@
{% extends 'base.html' %}
+
+
{% block css %}
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 %}
+
+{% if not path[0] %}[â¦] {% endif %} +{% for step in path %} +{% if step %} +{% if step.dependers %}â {% endif %}{{step.title}} +{% endif %} +{% endfor %} |
+
expected: | ||||||
adopted | effort | title | comments | ++ | [ ] | +
+{% if dep_slot.task.deps %}
+
+{% else %}
+({{dep_slot.task.title.then}})
+{% endif %}
+({{dep_slot.task.title.then}})+{% for task in dep_slot.task.deps %} +{{ task_with_deps(task, 1) }} +{% endfor %} + |
---|---|---|---|---|---|---|
bonus: |
+ | make new | +{{dep.title.then}} | +|||||
- | {{ '{:2.1f}'.format(todo.all_days_effort) }} {% if todo.done %}â{% else %} {% endif %} | -{{todo.day.date}} {{todo.title}} | -{{todo.comment}} | ++ | adopt | +{{suggested_todo.day.date}}:{{suggested_todo.title}}{% if suggested_todo.deps %}:+{% endif %} | +{{suggested_todo.comment}} |
{{dep.deps_depth}} | +{% if dep.deps_done %}{{ macros.doneness_string(dep) }}{% endif %} | +{{ draw_todo(dep) }} | +