X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/task?a=blobdiff_plain;f=templates%2Fday.html;h=4c77705b514b6aec0821b336fea107fcaea3cd1f;hb=6f44fcfab7927af1800107f9a2ad3ba05e0651f9;hp=efa1c9bb1e78fc5ea455c5a678b4727fb22efdd3;hpb=f19823e9e77ae0017022dbfe63f66d2b065ba33a;p=plomtask
diff --git a/templates/day.html b/templates/day.html
index efa1c9b..4c77705 100644
--- a/templates/day.html
+++ b/templates/day.html
@@ -1,88 +1,182 @@
-{% extends 'base.html' %}
+{% extends '_base.html' %}
+{% import '_macros.html' as macros %}
-{% 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 %}
+{% block css %}
+td, th, tr, table {
+ padding: 0;
+ margin: 0;
+}
+th {
+ border: 1px solid black;
+}
+td.min_width {
+ min-width: 1em;
+}
+td.cond_line_0 {
+ background-color: #ffbbbb;
+}
+td.cond_line_1 {
+ background-color: #bbffbb;
+}
+td.cond_line_2 {
+ background-color: #bbbbff;
+}
+td.todo_line {
+ border-bottom: 1px solid #bbbbbb;
+}
+{% endblock %}
-{% macro undone_with_children(node, indent) %}
-{% if not node.hide %}
+
+
+{% macro show_node_undone(node, indent) %}
+{% if not node.todo.is_done %}
-
-{% if node.is_todo %}
-
-{% endif %}
- |
-
-{{ show_node(node, indent) }}
+
+
+{% for condition in conditions_present %}
+ | {% if condition in node.todo.conditions %}{% if not condition.is_active %}O{% endif %}{% endif %} |
+{% endfor %}
+
+-> |
+ |
+ |
+
+{% for i in range(indent) %} {% endfor %} +
+{% if node.seen %}({% endif %}{{node.todo.process.title.newest|e}}{% if node.seen %}){% endif %}
|
+-> |
+
+{% for condition in conditions_present|reverse %}
+{% if condition in node.todo.enables %}+{% elif condition in node.todo.disables %}!{% endif %} |
+{% endfor %}
+
+ |
+
{% endif %}
+
+{% if not node.seen %}
{% for child in node.children %}
-{{ undone_with_children(child, indent+1) }}
+{{ show_node_undone(child, indent+1) }}
{% endfor %}
+{% endif %}
+
{% endmacro %}
-{% macro done_with_children(node, indent) %}
-{% if not node.hide %}
+
+{% macro show_node_done(node, indent, path) %}
+{% if node.todo.is_done %}
+
+{% if path|length > 0 and not path[-1].todo.is_done %}
-{{ show_node(node, indent) }}
+({% for path_node in path %}{{path_node.todo.process.title.newest|e}} <- {% endfor %})
|
+
+
+
+ +
+{% else %}
+ |
+{% for i in range(indent) %} {% endfor %} +
+{% endif %}
+{% if node.seen %}({% endif %}{{node.todo.process.title.newest|e}} {% if node.todo.comment|length > 0 %}[{{node.todo.comment|e}}]{% endif %}{% if node.seen %}){% endif %}
+ |
+
+
{% endif %}
+{% if not node.seen %}
{% for child in node.children %}
-{{ done_with_children(child, indent+1) }}
+{{ show_node_done(child, indent+1, path + [node]) }}
{% endfor %}
+{% endif %}
+
{% endmacro %}
+
{% block content %}
{{day.date}} / {{day.weekday}}
prev | next