home · contact · privacy
Add Conditions for Todos/Processes to be met or undone by other Todos.
[plomtask] / templates / day.html
1 {% extends 'base.html' %}
2
3 {% macro todo_with_children(todo, indent) %}
4 <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>
5 {% for child in todo.children %}
6 {{ todo_with_children(child, indent+1) }}
7 {% endfor %}
8 {% for condition in todo.conditions %}
9 <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>
10 {% endfor %}
11 {% endmacro %}
12
13 {% block content %}
14 <h3>{{day.date}} / {{day.weekday}}</h3>
15 <p>
16 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
17 </p>
18 <form action="day?date={{day.date}}" method="POST">
19 comment: <input name="comment" value="{{day.comment|e}}" />
20 <input type="submit" value="OK" /><br />
21 add todo: <input name="new_todo" list="processes" autocomplete="off" />
22 <datalist id="processes">
23 {% for process in processes %}
24 <option value="{{process.id_}}">{{process.title.newest|e}}</option>
25 {% endfor %}
26 </datalist>
27 </form>
28 <h4>conditions</h4>
29 {% for node in conditions_listing %}
30 <li>[{% if node['condition'].is_active %}x{% else %} {% endif %}] <a href="condition?id={{node['condition'].id_}}">{{node['condition'].title.newest|e}}</a>
31 <ul>
32 {% for enabler in node['enablers'] %}
33 <li>[+] {{enabler.process.title.newest|e}}</li>
34 {% endfor %}
35 {% for disabler in node['disablers'] %}
36 <li>[-] {{disabler.process.title.newest|e}}</li>
37 {% endfor %}
38 </ul>
39 </li>
40 {% endfor %}
41 <h4>todos</h4>
42 <ul>
43 {% for todo in todos %}
44 {{ todo_with_children(todo, 0) }}
45 {% endfor %}
46 </ul>
47 {% endblock %}
48