home · contact · privacy
Improve placement of Todos and Conditions in Day view.
[plomtask] / templates / day.html
index 82eaa56fb7b9acfd6aa55b7db39f080f15459ce4..a089037a829092c7e1a29cda45775dd170e1f35e 100644 (file)
@@ -6,7 +6,20 @@
 {{ todo_with_children(child, indent+1) }}
 {% endfor %}
 {% for condition in todo.conditions %}
-<li>{% for i in range(indent+1) %}+{% endfor %} [{% if condition.is_active %}x{% else %} {% endif %}] <a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a>
+<li>{% for i in range(indent) %}&nbsp;{% endfor %}&nbsp; &lt;[{% if condition.is_active %}x{% else %} {% endif %}] <a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a>
+{% endfor %}
+{% endmacro %}
+
+{% macro node_with_children(node, indent) %}
+<li>{% for i in range(indent) %}+{% endfor %}
+{% if node.is_todo %}
+{% if not node.item.is_doable %}<del>{% endif %}[{% if node.item.is_done %}x{% else %} {% endif %}]{% if not node.item.is_doable %}</del>{% endif %}
+{% if node.seen %}({% else %}{% endif %}<a href="todo?id={{node.item.id_}}">{{node.item.process.title.newest|e}}</a>{% if node.seen %}){% else %}{% endif %}
+{% else %}
+&lt; {% if node.seen %}({% else %}{% endif %}<a href="condition?id={{node.item.id_}}">{{node.item.title.newest|e}}</a>{% if node.seen %}){% else %}{% endif %}
+{% endif %}
+{% for child in node.children %}
+{{ node_with_children(child, indent+1) }}
 {% endfor %}
 {% endmacro %}
 
@@ -30,18 +43,18 @@ add todo: <input name="new_todo" list="processes" autocomplete="off" />
 <li>[{% if node['condition'].is_active %}x{% else %} {% endif %}] <a href="condition?id={{node['condition'].id_}}">{{node['condition'].title.newest|e}}</a>
 <ul>
 {% for enabler in node['enablers'] %}
-<li>[+] {{enabler.process.title.newest|e}}</li>
+<li>&lt; {{enabler.process.title.newest|e}}</li>
 {% endfor %}
 {% for disabler in node['disablers'] %}
-<li>[-] {{disabler.process.title.newest|e}}</li>
+<li>! {{disabler.process.title.newest|e}}</li>
 {% endfor %}
 </ul>
 </li>
 {% endfor %}
 <h4>todos</h4>
 <ul>
-{% for todo in todos %}
-{{ todo_with_children(todo, 0) }}
+{% for node in todo_trees %}
+{{ node_with_children(node, 0) }}
 {% endfor %}
 </ul>
 {% endblock %}