X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/balance?a=blobdiff_plain;f=todo_templates%2Ftodo.html;h=e62a09b8c02547bcfb48dabf7f1b5b73f72163f9;hb=ecee822bebf62049803b90fc8d8a0b484915a0fc;hp=45ed8a88bd21e63f334d3fd950f7f4df6eb803b4;hpb=38b9ce0ba2b5af072554999bc5836ffe455f06db;p=misc diff --git a/todo_templates/todo.html b/todo_templates/todo.html index 45ed8a8..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 %} + + +{{ macros.doneness_string(t) }} + +{% if t.deps and not t.been_observed %} +
+{{ draw_todo(t) }} +{% for dep in t.deps %} +{{ todo_with_deps(dep, 0) }} +{% endfor %} +
+{% else %} +{{ draw_todo(t) }} +{% endif %} + +{{ t.observe() }} + +{% endfor %} +{% endmacro %} + + + {% block content %}

edit todo

@@ -30,13 +87,10 @@ tr.lowlevel td, tr.lowlevel th { padding-top: 0em; } work -{% if todo.children %} -[{% if todo.done %}✓{% else %} {% endif %}] -{% else %} - -{% endif %} + done
-(sum: {{todo.all_days_effort}}) +(all days: {{todo.all_days_effort}})
+(dependencies: {{todo.all_days_effort}}) @@ -51,10 +105,10 @@ done
{{date}} {% endfor %} @@ -63,7 +117,7 @@ done
- + -{% if not (todo.children and effort) %}{% endif %} +{% if not (todo.deps and effort) %}{% endif %}
- +
@@ -80,57 +134,129 @@ done
tags -new: +new: {{ macros.tagselection(submit_name='tag', selected_tags=todo.day_tags, all_tags=tags) }} {% for tag in todo.task.tags.now | sort %}{% endfor %} -{{ macros.tagselection(submit_name='tag', selected_tags=todo.day_tags, all_tags=tags) }}
-{% if todo.parents %} +{% if todo.dependers %} -parents +dependers -