X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/todo?a=blobdiff_plain;f=templates%2Fday.html;h=efa1c9bb1e78fc5ea455c5a678b4727fb22efdd3;hb=f19823e9e77ae0017022dbfe63f66d2b065ba33a;hp=e3fe5ef29c5865551d42d751a5d45ea380921065;hpb=db1c88ab178f6ec54a994f2789c9db25604fcd83;p=plomtask
diff --git a/templates/day.html b/templates/day.html
index e3fe5ef..efa1c9b 100644
--- a/templates/day.html
+++ b/templates/day.html
@@ -1,18 +1,50 @@
{% extends 'base.html' %}
-{% macro node_with_children(node, indent) %}
-
{% for i in range(indent) %}+{% endfor %}
+
+{% macro show_node(node, indent) %}
{% if node.is_todo %}
-{% if not node.item.is_doable %}{% endif %}[{% if node.item.is_done %}x{% else %} {% endif %}]{% if not node.item.is_doable %}{% endif %}
+{% for i in range(indent) %} {% endfor %} +
{% if node.seen %}({% else %}{% endif %}{{node.item.process.title.newest|e}}{% if node.seen %}){% else %}{% endif %}
{% else %}
-< {% if node.seen %}({% else %}{% endif %}{{node.item.title.newest|e}}{% if node.seen %}){% else %}{% endif %}
+{% 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 %}
+{% endmacro %}
+
+
+{% macro done_with_children(node, indent) %}
+{% if not node.hide %}
+
+
+{{ show_node(node, indent) }}
+ |
+
{% endif %}
{% for child in node.children %}
-{{ node_with_children(child, indent+1) }}
+{{ done_with_children(child, indent+1) }}
{% endfor %}
{% endmacro %}
+
{% block content %}
{{day.date}} / {{day.weekday}}
@@ -27,25 +59,30 @@ add todo:
{% endfor %}
-
conditions
+
{% 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}}
+({% for enabler in node.enablers %}
+< {{enabler.process.title.newest|e}};
{% endfor %}
{% for disabler in node.disablers %}
-- ! {{disabler.process.title.newest|e}}
+! {{disabler.process.title.newest|e}};
+{% endfor %})
{% endfor %}
-
-{% endfor %}
-todos
-
+to do
+
{% for node in todo_trees %}
-{{ node_with_children(node, 0) }}
+{{ undone_with_children(node, indent=0) }}
{% endfor %}
-
+
+done
+
+{% for node in done_trees %}
+{{ done_with_children(node, indent=0) }}
+{% endfor %}
+
+
{% endblock %}