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: #dddddd;
22 border-top: 1px solid white;
23 background-color: #efefef;
26 border-top: 1px solid white;
27 background-color: #fffff;
36 border-bottom: 1px solid #dddddd;
39 tr.inactive td.todo_line {
40 background-color: #dddddd;
43 border-left: 1px solid black;
46 border-right: 1px solid black;
51 input[name="day_comment"] {
58 {% macro show_node_undone(node, indent) %}
59 {% if not node.todo.is_done %}
60 <tr {% if node.seen or not node.todo.is_doable %}class="inactive"{% endif %}>
61 {% if not node.seen %}
62 <input type="hidden" name="todo_id" value="{{node.todo.id_}}" />
65 {% for condition in conditions_present %}
66 <td class="cond_line_{{loop.index0 % 3}}">
67 {% if condition in node.todo.conditions and not condition.is_active %}
69 {% elif condition in node.todo.blockers and condition.is_active %}
76 <td class="todo_line left_border"></td>
77 <td class="todo_line">{% if node.todo.effort %}{{ node.todo.effort }}{% endif %}</td>
79 <td class="todo_line left_border"><input name="done" type="checkbox" value="{{node.todo.id_}}" {% if not node.todo.is_doable %}disabled{% endif %}/></td>
80 <td class="todo_line"><input name="effort" type="number" step=0.1 size=5 placeholder={{node.todo.effort_then}} value={{node.todo.effort}} /></td>
82 <td class="todo_line right_border">
83 {% for i in range(indent) %} {% endfor %} +
84 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a>{% if node.seen %}){% endif %}
87 {% for condition in conditions_present|reverse %}
88 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">{% if condition in node.todo.enables %} +{% elif condition in node.todo.disables %} !{% endif %}</td>
93 {{node.todo.comment|e}}
95 <input name="comment" type="text" value="{{node.todo.comment|e}}" />
102 {% if not node.seen %}
103 {% for child in node.children %}
104 {{ show_node_undone(child, indent+1) }}
112 {% macro show_node_done(node, indent, path) %}
113 {% if node.todo.is_done %}
116 {% if path|length > 0 and not path[-1].todo.is_done %}
118 ({% for path_node in path %}<a href="todo?id={{path_node.todo.id_}}">{{path_node.todo.title_then|e}}</a> <- {% endfor %})
127 {% for i in range(indent) %} {% endfor %} +
129 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a> {% if node.todo.comment|length > 0 %}[{{node.todo.comment|e}}]{% endif %}{% if node.seen %}){% endif %}
134 {% if not node.seen %}
135 {% for child in node.children %}
136 {{ show_node_done(child, indent+1, path + [node]) }}
145 <h3>{{day.date}} / {{day.weekday}}</h3>
147 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
149 <form action="day?date={{day.date}}" method="POST">
153 <input name="day_comment" value="{{day.comment|e}}" />
154 <input type="submit" value="OK" /></td>
162 <th colspan={{ conditions_present|length + 3 + conditions_present|length }}>conditions</th>
164 <th>add disabler</th>
167 {% for condition in conditions_present %}
168 {% set outer_loop = loop %}
171 {% for _ in conditions_present %}
172 {% if outer_loop.index > loop.index %}
173 <td class="cond_line_{{loop.index0 % 3}}">
174 {% elif outer_loop.index < loop.index %}
175 <td class="cond_line_{{outer_loop.index0 % 3}}">
177 <td class="cond_line_{{outer_loop.index0 % 3}} cond_line_corner">×
182 <td class="cond_line_{{loop.index0 % 3}}"><input type="checkbox" disabled{% if condition.is_active %} checked{% endif %}></td>
183 <td colspan=2 class="cond_line_{{loop.index0 % 3}}"><a href="condition?id={{condition.id_}}">{{condition.title.at(day.date)|e}}</a></td>
185 {% for _ in conditions_present %}
186 {% if outer_loop.index0 + loop.index < conditions_present|length %}
187 <td class="cond_line_{{outer_loop.index0 % 3}}">
188 {% elif outer_loop.index0 + loop.index > conditions_present|length %}
189 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">
191 <td class="cond_line_{{outer_loop.index0 % 3}} cond_line_corner"> ×
195 {% set list_name = "todos_for_%s"|format(condition.id_) %}
196 <td><input name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
197 {{ macros.datalist_of_titles(list_name, enablers_for[condition.id_]) }}
199 {% set list_name = "todos_against_%s"|format(condition.id_) %}
200 <td><input name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
201 {{ macros.datalist_of_titles(list_name, disablers_for[condition.id_]) }}
207 {% for condition in conditions_present %}
208 <td class="cond_line_{{loop.index0 % 3}}"></td>
210 <th colspan=3>doables</th>
211 {% for condition in conditions_present %}
212 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}"></td>
217 {% for condition in conditions_present %}
218 <td class="cond_line_{{loop.index0 % 3}}"></td>
220 <td class="left_border"></td>
222 <td class="right_border" ><input type="text" name="new_todo" list="processes"></td>
223 {% for condition in conditions_present %}
224 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}"></td>
226 <th colspan=2>comments</th>
228 {% for node in top_nodes %}
229 {{ show_node_undone(node, 0) }}
237 {% for node in top_nodes %}
238 {{ show_node_done(node, 0, []) }}
244 {{ macros.datalist_of_titles("processes", processes) }}