1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
12 border: 1px solid black;
18 background-color: #ffbbbb;
21 background-color: #bbffbb;
24 background-color: #bbbbff;
27 border-bottom: 1px solid #bbbbbb;
33 {% macro show_node_undone(node, indent) %}
34 {% if not node.todo.is_done %}
36 {% if not node.seen %}
37 <input type="hidden" name="todo_id" value="{{node.todo.id_}}" />
40 {% for condition in conditions_present %}
41 <td class="cond_line_{{loop.index0 % 3}} {% if not condition.is_active %}min_width{% endif %}">{% if condition in node.todo.conditions %}{% if not condition.is_active %}O{% endif %}{% endif %}</td>
44 <td class="todo_line">-></td>
46 <td class="todo_line"></td>
47 <td class="todo_line">{% if node.todo.effort %}{{ node.todo.effort }}{% endif %}</td>
49 <td class="todo_line"><input name="done" type="checkbox" value="{{node.todo.id_}}" {% if not node.todo.is_doable %}disabled{% endif %}/></td>
50 <td class="todo_line"><input name="effort" type="number" step=0.1 size=5 placeholder={{node.todo.process.effort.newest }} value={{node.todo.effort}} /></td>
52 <td class="todo_line">
53 {% for i in range(indent) %} {% endfor %} +
54 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.process.title.newest|e}}</a>{% if node.seen %}){% endif %}
56 <td class="todo_line">-></td>
58 {% for condition in conditions_present|reverse %}
59 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}} {% if condition in node.todo.enables or condition in node.todo.disables %}min_width{% endif %}">{% if condition in node.todo.enables %}+{% elif condition in node.todo.disables %}!{% endif %}</td>
64 {{node.todo.comment|e}}
66 <input name="comment" value="{{node.todo.comment|e}}" />
73 {% if not node.seen %}
74 {% for child in node.children %}
75 {{ show_node_undone(child, indent+1) }}
83 {% macro show_node_done(node, indent, path) %}
84 {% if node.todo.is_done %}
87 {% if path|length > 0 and not path[-1].todo.is_done %}
89 ({% for path_node in path %}<a href="todo?id={{path_node.todo.id_}}">{{path_node.todo.process.title.newest|e}}</a> <- {% endfor %})
98 {% for i in range(indent) %} {% endfor %} +
100 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.process.title.newest|e}}</a> {% if node.todo.comment|length > 0 %}[{{node.todo.comment|e}}]{% endif %}{% if node.seen %}){% endif %}
105 {% if not node.seen %}
106 {% for child in node.children %}
107 {{ show_node_done(child, indent+1, path + [node]) }}
116 <h3>{{day.date}} / {{day.weekday}}</h3>
118 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
120 <form action="day?date={{day.date}}" method="POST">
121 comment: <input name="day_comment" value="{{day.comment|e}}" />
122 <input type="submit" value="OK" /><br />
123 add todo: <input name="new_todo" list="processes" autocomplete="off" />
130 <th colspan={{ conditions_present|length}}>c</th>
131 <th colspan=5>states</th>
132 <th colspan={{ conditions_present|length}}>t</th>
136 {% for condition in conditions_present %}
137 {% set outer_loop = loop %}
140 {% for _ in conditions_present %}
141 {% if outer_loop.index > loop.index %}
142 <td class="cond_line_{{loop.index0 % 3}}">
144 <td class="cond_line_{{outer_loop.index0 % 3}}">
146 {% if outer_loop.index == loop.index %}
151 <td class="cond_line_{{loop.index0 % 3}}">[{% if condition.is_active %}X{% else %} {% endif %}]</td>
152 <td colspan=4 class="cond_line_{{loop.index0 % 3}}"><a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a></td>
154 {% for _ in conditions_present %}
155 {% if outer_loop.index0 + loop.index0 < conditions_present|length %}
156 <td class="cond_line_{{outer_loop.index0 % 3}}">
158 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">
161 {% set list_name = "todos_for_%s"|format(condition.id_) %}
162 <td><input name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
163 {{ macros.datalist_of_titles(list_name, enablers_for[condition.id_]) }}
169 {% for condition in conditions_present %}
170 <td class="cond_line_{{loop.index0 % 3}}"></td>
172 <th colspan=5>doables</th>
173 {% for condition in conditions_present %}
174 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}"></td>
178 {% for node in top_nodes %}
179 {{ show_node_undone(node, 0) }}
187 {% for node in top_nodes %}
188 {{ show_node_done(node, 0, []) }}
194 {{ macros.datalist_of_titles("processes", processes) }}