X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/ledger2?a=blobdiff_plain;f=templates%2Fday.html;h=efa1c9bb1e78fc5ea455c5a678b4727fb22efdd3;hb=a1d3ef4b42bdac28f20d7f104ff93bf7efa37a30;hp=82eaa56fb7b9acfd6aa55b7db39f080f15459ce4;hpb=34741b65438149b4e02f1e2bb4f8fdba5df5a667;p=plomtask
diff --git a/templates/day.html b/templates/day.html
index 82eaa56..efa1c9b 100644
--- a/templates/day.html
+++ b/templates/day.html
@@ -1,15 +1,50 @@
{% extends 'base.html' %}
-{% macro todo_with_children(todo, indent) %}
-
{% for i in range(indent) %}+{% endfor %} [{% if todo.is_done %}x{% else %} {% endif %}] {{todo.process.title.newest|e}}
-{% for child in todo.children %}
-{{ todo_with_children(child, indent+1) }}
+
+{% macro show_node(node, indent) %}
+{% if node.is_todo %}
+{% for i in range(indent) %} {% endfor %} +
+{% if node.seen %}({% else %}{% endif %}{{node.item.process.title.newest|e}}{% if node.seen %}){% else %}{% endif %}
+{% else %}
+{% for i in range(indent) %} {% endfor %} +
+{% if node.seen %}({% else %}{% endif %}{{node.item.title.newest|e}}{% if node.seen %}){% else %}{% endif %}
+{% endif %}
+{% endmacro %}
+
+
+{% macro undone_with_children(node, indent) %}
+{% if not node.hide %}
+
+
+{% if node.is_todo %}
+
+{% endif %}
+ |
+
+{{ show_node(node, indent) }}
+ |
+
+{% endif %}
+{% for child in node.children %}
+{{ undone_with_children(child, indent+1) }}
{% endfor %}
-{% for condition in todo.conditions %}
-{% for i in range(indent+1) %}+{% endfor %} [{% if condition.is_active %}x{% else %} {% endif %}] {{condition.title.newest|e}}
+{% endmacro %}
+
+
+{% macro done_with_children(node, indent) %}
+{% if not node.hide %}
+
+
+{{ show_node(node, indent) }}
+ |
+
+{% endif %}
+{% for child in node.children %}
+{{ done_with_children(child, indent+1) }}
{% endfor %}
{% endmacro %}
+
{% block content %}
{{day.date}} / {{day.weekday}}
@@ -24,25 +59,30 @@ add todo:
{% endfor %}
-
conditions
-{% for node in conditions_listing %}
-[{% if node['condition'].is_active %}x{% else %} {% endif %}] {{node['condition'].title.newest|e}}
-{% for enabler in node['enablers'] %}
-- [+] {{enabler.process.title.newest|e}}
+{% for node in condition_listings %}
+- [{% if node.condition.is_active %}x{% else %} {% endif %}] {{node.condition.title.newest|e}}
+({% for enabler in node.enablers %}
+< {{enabler.process.title.newest|e}};
{% endfor %}
-{% for disabler in node['disablers'] %}
-
- [-] {{disabler.process.title.newest|e}}
+{% for disabler in node.disablers %}
+! {{disabler.process.title.newest|e}};
+{% endfor %})
{% endfor %}
-
+to do
+
+{% for node in todo_trees %}
+{{ undone_with_children(node, indent=0) }}
{% endfor %}
-todos
-
-{% for todo in todos %}
-{{ todo_with_children(todo, 0) }}
+
+done
+
+{% for node in done_trees %}
+{{ done_with_children(node, indent=0) }}
{% endfor %}
-
+
+
{% endblock %}