home · contact · privacy
Add Conditions for Todos/Processes to be met or undone by other Todos.
[plomtask] / templates / day.html
index 0953d52446555fb695f021121ac3c9798827597d..82eaa56fb7b9acfd6aa55b7db39f080f15459ce4 100644 (file)
@@ -1,10 +1,13 @@
 {% extends 'base.html' %}
 
 {% macro todo_with_children(todo, indent) %}
-<li>{% for i in range(indent) %}+{% endfor %}<a href="todo?id={{todo.id_}}">{{todo.process.title.newest|e}}</a>
+<li>{% for i in range(indent) %}+{% endfor %} [{% if todo.is_done %}x{% else %} {% endif %}] <a href="todo?id={{todo.id_}}">{{todo.process.title.newest|e}}</a>
 {% for child in todo.children %}
 {{ 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>
+{% endfor %}
 {% endmacro %}
 
 {% block content %}
@@ -22,6 +25,20 @@ add todo: <input name="new_todo" list="processes" autocomplete="off" />
 {% endfor %}
 </datalist>
 </form>
+<h4>conditions</h4>
+{% for node in conditions_listing %}
+<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>
+{% endfor %}
+{% for disabler in node['disablers'] %}
+<li>[-] {{disabler.process.title.newest|e}}</li>
+{% endfor %}
+</ul>
+</li>
+{% endfor %}
+<h4>todos</h4>
 <ul>
 {% for todo in todos %}
 {{ todo_with_children(todo, 0) }}