1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
12 border-collapse: collapse;
15 border: 1px solid black;
18 border-top: 1px solid white;
19 background-color: #bfbfbf;
22 border-top: 1px solid white;
23 background-color: #dfdfdf;
26 border-top: 1px solid white;
27 background-color: #fffff;
36 border-bottom: 1px solid #bfbfbf;
39 tr.inactive td.todo_line {
40 background-color: #bfbfbf;
42 tr.hidden_undone td, tr.hidden_undone a {
46 border-left: 1px solid black;
49 border-right: 1px solid black;
54 input[name="day_comment"] {
61 {% macro show_node_undone(node, indent) %}
62 {% if not node.todo.is_done %}
63 <tr {% if node.seen or not node.todo.is_doable %}class="inactive"{% endif %}>
64 {% if not node.seen %}
65 <input type="hidden" name="todo_id" value="{{node.todo.id_}}" />
68 {% for condition in conditions_present %}
69 <td class="cond_line_{{loop.index0 % 3}}">
70 {% if condition in node.todo.conditions and not condition.is_active %}
72 {% elif condition in node.todo.blockers and condition.is_active %}
79 <td class="todo_line left_border"></td>
80 <td class="todo_line">{% if node.todo.effort %}{{ node.todo.effort }}{% endif %}</td>
82 <td class="todo_line left_border"><input name="done" type="checkbox" value="{{node.todo.id_}}" {% if not node.todo.is_doable %}disabled{% endif %}/></td>
83 <td class="todo_line"><input name="effort" type="number" step=0.1 size=5 placeholder={{node.todo.effort_then}} value={{node.todo.effort}} /></td>
85 <td class="todo_line right_border">
86 {% for i in range(indent) %} {% endfor %} +
87 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a>{% if node.seen %}){% endif %}
90 {% for condition in conditions_present|reverse %}
91 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">{% if condition in node.todo.enables %} +{% elif condition in node.todo.disables %} !{% endif %}</td>
96 {{node.todo.comment|e}}
98 <input name="comment" type="text" value="{{node.todo.comment|e}}" />
105 {% if not node.seen %}
106 {% for child in node.children %}
107 {{ show_node_undone(child, indent+1) }}
115 {% macro show_node_done(node, indent, path) %}
116 {% if node.todo.has_doneness_in_path %}
117 <tr{% if not node.todo.is_done %} class="hidden_undone"{% endif %}>
119 {% for i in range(indent) %} {% endfor %} +
120 {% if not node.todo.is_done %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a>{% if not node.todo.is_done %}){% endif %}
122 <td>{{node.todo.comment|e}}</td>
125 {% if not node.seen %}
126 {% for child in node.children %}
127 {{ show_node_done(child, indent+1) }}
136 <h3>{{day.date}} / {{day.weekday}}</h3>
138 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
140 <form action="day?date={{day.date}}" method="POST">
144 <input name="day_comment" value="{{day.comment|e}}" />
145 <input type="submit" value="OK" /></td>
153 <th colspan={{ conditions_present|length + 3 + conditions_present|length }}>conditions</th>
155 <th>add disabler</th>
158 {% for condition in conditions_present %}
159 {% set outer_loop = loop %}
162 {% for _ in conditions_present %}
163 {% if outer_loop.index > loop.index %}
164 <td class="cond_line_{{loop.index0 % 3}}">
165 {% elif outer_loop.index < loop.index %}
166 <td class="cond_line_{{outer_loop.index0 % 3}}">
168 <td class="cond_line_{{outer_loop.index0 % 3}} cond_line_corner">×
173 <td class="cond_line_{{loop.index0 % 3}}"><input type="checkbox" disabled{% if condition.is_active %} checked{% endif %}></td>
174 <td colspan=2 class="cond_line_{{loop.index0 % 3}}"><a href="condition?id={{condition.id_}}">{{condition.title.at(day.date)|e}}</a></td>
176 {% for _ in conditions_present %}
177 {% if outer_loop.index0 + loop.index < conditions_present|length %}
178 <td class="cond_line_{{outer_loop.index0 % 3}}">
179 {% elif outer_loop.index0 + loop.index > conditions_present|length %}
180 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">
182 <td class="cond_line_{{outer_loop.index0 % 3}} cond_line_corner"> ×
186 {% set list_name = "todos_for_%s"|format(condition.id_) %}
187 <td><input name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
188 {{ macros.datalist_of_titles(list_name, enablers_for[condition.id_]) }}
190 {% set list_name = "todos_against_%s"|format(condition.id_) %}
191 <td><input name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
192 {{ macros.datalist_of_titles(list_name, disablers_for[condition.id_]) }}
198 {% for condition in conditions_present %}
199 <td class="cond_line_{{loop.index0 % 3}}"></td>
201 <th colspan=3>doables</th>
202 {% for condition in conditions_present %}
203 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}"></td>
208 {% for condition in conditions_present %}
209 <td class="cond_line_{{loop.index0 % 3}}"></td>
211 <td class="left_border"></td>
213 <td class="right_border" ><input type="text" name="new_todo" list="processes"></td>
214 {% for condition in conditions_present %}
215 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}"></td>
217 <th colspan=2>comments</th>
219 {% for node in top_nodes %}
220 {{ show_node_undone(node, 0) }}
228 {% for node in top_nodes %}
229 {{ show_node_done(node, 0, []) }}
235 {{ macros.datalist_of_titles("processes", processes) }}