1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
8 border-collapse: collapse;
11 border: 1px solid black;
13 td.cond_line_0, td.cond_line_1, td.cond_line_2 {
15 border-top: 1px solid white;
18 background-color: #bfbfbf;
21 background-color: #dfdfdf;
24 background-color: #fffff;
33 border-bottom: 1px solid #bfbfbf;
36 tr.inactive > td.todo_line {
37 background-color: #bfbfbf;
39 tr.hidden_undone > td, tr.hidden_undone a {
43 border-left: 1px solid black;
46 border-right: 1px solid black;
55 {% macro show_node_undone(node, indent) %}
56 {% if not node.todo.is_done %}
57 <tr {% if node.seen or not node.todo.is_doable %}class="inactive"{% endif %}>
58 {% if not node.seen %}
59 <input type="hidden" name="todo_id" value="{{node.todo.id_}}" />
62 {% for condition in conditions_present %}
63 <td class="cond_line_{{loop.index0 % 3}}">
64 {% if condition in node.todo.conditions and not condition.is_active %}
66 {% elif condition in node.todo.blockers and condition.is_active %}
73 <td class="todo_line left_border"></td>
74 <td class="todo_line">{% if node.todo.effort %}{{ node.todo.effort }}{% endif %}</td>
76 <td class="todo_line left_border"><input name="done" type="checkbox" value="{{node.todo.id_}}" {% if not node.todo.is_doable %}disabled{% endif %}/></td>
77 <td class="todo_line"><input name="effort" type="number" step=0.1 size=5 placeholder={{node.todo.effort_then}} value={{node.todo.effort}} /></td>
79 <td class="todo_line right_border">
80 {% for i in range(indent) %} {% endfor %} +
81 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a>{% if node.seen %}){% endif %}
84 {% for condition in conditions_present|reverse %}
85 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">{% if condition in node.todo.enables %} +{% elif condition in node.todo.disables %} !{% endif %}</td>
90 {{node.todo.comment|e}}
92 <input name="comment" type="text" value="{{node.todo.comment|e}}" />
99 {% if not node.seen %}
100 {% for child in node.children %}
101 {{ show_node_undone(child, indent+1) }}
109 {% macro show_node_done(node, indent, path) %}
110 {% if node.todo.has_doneness_in_path %}
111 <tr{% if not node.todo.is_done %} class="hidden_undone"{% endif %}>
113 {% for i in range(indent) %} {% endfor %} +
114 {% 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 %}
116 <td>{{node.todo.comment|e}}</td>
119 {% if not node.seen %}
120 {% for child in node.children %}
121 {{ show_node_done(child, indent+1) }}
130 <h3>{{day.date}} / {{day.weekday}}</h3>
132 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
134 <form action="day?date={{day.date}}" method="POST">
138 <input name="day_comment" type="text" value="{{day.comment|e}}" />
139 <input type="submit" value="OK" /></td>
145 add: <input type="text" name="new_todo" list="processes">
151 <th colspan={{ conditions_present|length + 3 + conditions_present|length }}>conditions</th>
153 <th>add disabler</th>
156 {% for condition in conditions_present %}
157 {% set outer_loop = loop %}
160 {% for _ in conditions_present %}
161 {% if outer_loop.index > loop.index %}
162 <td class="cond_line_{{loop.index0 % 3}}">
163 {% elif outer_loop.index < loop.index %}
164 <td class="cond_line_{{outer_loop.index0 % 3}}">
166 <td class="cond_line_{{outer_loop.index0 % 3}} cond_line_corner">×
171 <td class="cond_line_{{loop.index0 % 3}}"><input type="checkbox" disabled{% if condition.is_active %} checked{% endif %}></td>
172 <td colspan=2 class="cond_line_{{loop.index0 % 3}}"><a href="condition?id={{condition.id_}}">{{condition.title.at(day.date)|e}}</a></td>
174 {% for _ in conditions_present %}
175 {% if outer_loop.index0 + loop.index < conditions_present|length %}
176 <td class="cond_line_{{outer_loop.index0 % 3}}">
177 {% elif outer_loop.index0 + loop.index > conditions_present|length %}
178 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">
180 <td class="cond_line_{{outer_loop.index0 % 3}} cond_line_corner"> ×
184 {% set list_name = "todos_for_%s"|format(condition.id_) %}
185 <td><input class="ablers" type="text" name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
186 {{ macros.datalist_of_titles(list_name, enablers_for[condition.id_]) }}
188 {% set list_name = "todos_against_%s"|format(condition.id_) %}
189 <td><input class="ablers" type="text" name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
190 {{ macros.datalist_of_titles(list_name, disablers_for[condition.id_]) }}
196 {% for condition in conditions_present %}
197 <td class="cond_line_{{loop.index0 % 3}}"></td>
199 <th colspan=3>doables</th>
200 {% for condition in conditions_present %}
201 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}"></td>
205 {% for node in top_nodes %}
206 {{ show_node_undone(node, 0) }}
214 {% for node in top_nodes %}
215 {{ show_node_done(node, 0, []) }}
221 {{ macros.datalist_of_titles("processes", processes) }}