home · contact · privacy
b38d566d67185990316878e2c4d7b0eb0795336b
[plomtask] / templates / day.html
1 {% extends 'base.html' %}
2
3 {% macro node_with_children(node, indent) %}
4 <li>{% for i in range(indent) %}+{% endfor %}
5 {% if node.is_todo %}
6 {% if not node.item.is_doable %}<del>{% endif %}[{% if node.item.is_done %}x{% else %} {% endif %}]{% if not node.item.is_doable %}</del>{% endif %}
7 {% if node.seen %}({% else %}{% endif %}<a href="todo?id={{node.item.id_}}">{{node.item.process.title.newest|e}}</a>{% if node.seen %}){% else %}{% endif %}
8 {% else %}
9 &lt; {% if node.seen %}({% else %}{% endif %}<a href="condition?id={{node.item.id_}}">{{node.item.title.newest|e}}</a>{% if node.seen %}){% else %}{% endif %}
10 {% endif %}
11 {% for child in node.children %}
12 {{ node_with_children(child, indent+1) }}
13 {% endfor %}
14 {% endmacro %}
15
16 {% block content %}
17 <h3>{{day.date}} / {{day.weekday}}</h3>
18 <p>
19 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
20 </p>
21 <form action="day?date={{day.date}}" method="POST">
22 comment: <input name="comment" value="{{day.comment|e}}" />
23 <input type="submit" value="OK" /><br />
24 add todo: <input name="new_todo" list="processes" autocomplete="off" />
25 <datalist id="processes">
26 {% for process in processes %}
27 <option value="{{process.id_}}">{{process.title.newest|e}}</option>
28 {% endfor %}
29 </datalist>
30 </form>
31 <h4>conditions</h4>
32 {% for node in conditions_nodes %}
33 <li>[{% if node.condition.is_active %}x{% else %} {% endif %}] <a href="condition?id={{node.condition.id_}}">{{node.condition.title.newest|e}}</a>
34 <ul>
35 {% for enabler in node.enablers %}
36 <li>&lt; {{enabler.process.title.newest|e}}</li>
37 {% endfor %}
38 {% for disabler in node.disablers %}
39 <li>! {{disabler.process.title.newest|e}}</li>
40 {% endfor %}
41 </ul>
42 </li>
43 {% endfor %}
44 <h4>todos</h4>
45 <ul>
46 {% for node in todo_trees %}
47 {{ node_with_children(node, 0) }}
48 {% endfor %}
49 </ul>
50 {% endblock %}
51