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: #efefef;
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 or condition in node.todo.disables %}min_width{% endif %}">{% if condition in node.todo.enables %} +{% elif condition in node.todo.disables %} !{% endif %}</td>
90 {{node.todo.comment|e}}
92 <input name="comment" value="{{node.todo.comment|e}}" style="width: 100%" />
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.is_done %}
113 {% if path|length > 0 and not path[-1].todo.is_done %}
115 ({% for path_node in path %}<a href="todo?id={{path_node.todo.id_}}">{{path_node.todo.title_then|e}}</a> <- {% endfor %})
124 {% for i in range(indent) %} {% endfor %} +
126 {% 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 %}
131 {% if not node.seen %}
132 {% for child in node.children %}
133 {{ show_node_done(child, indent+1, path + [node]) }}
142 <h3>{{day.date}} / {{day.weekday}}</h3>
144 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
146 <form action="day?date={{day.date}}" method="POST">
147 comment: <input name="day_comment" value="{{day.comment|e}}" />
148 <input type="submit" value="OK" /><br />
149 add todo: <input name="new_todo" list="processes" autocomplete="off" />
156 <th colspan={{ conditions_present|length + 3 + conditions_present|length }}>states</th>
158 <th>add disabler</th>
161 {% for condition in conditions_present %}
162 {% set outer_loop = loop %}
165 {% for _ in conditions_present %}
166 {% if outer_loop.index > loop.index %}
167 <td class="cond_line_{{loop.index0 % 3}}">
168 {% elif outer_loop.index < loop.index %}
169 <td class="cond_line_{{outer_loop.index0 % 3}}">
171 <td class="cond_line_{{outer_loop.index0 % 3}} cond_line_corner">X
176 <td class="cond_line_{{loop.index0 % 3}}">[{% if condition.is_active %}X{% else %} {% endif %}]</td>
177 <td colspan=2 class="cond_line_{{loop.index0 % 3}}"><a href="condition?id={{condition.id_}}">{{condition.title.at(day.date)|e}}</a></td>
179 {% for _ in conditions_present %}
180 {% if outer_loop.index0 + loop.index < conditions_present|length %}
181 <td class="cond_line_{{outer_loop.index0 % 3}}">
182 {% elif outer_loop.index0 + loop.index > conditions_present|length %}
183 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">
185 <td class="cond_line_{{outer_loop.index0 % 3}} cond_line_corner"> X
189 {% set list_name = "todos_for_%s"|format(condition.id_) %}
190 <td><input name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
191 {{ macros.datalist_of_titles(list_name, enablers_for[condition.id_]) }}
193 {% set list_name = "todos_against_%s"|format(condition.id_) %}
194 <td><input name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
195 {{ macros.datalist_of_titles(list_name, disablers_for[condition.id_]) }}
201 {% for condition in conditions_present %}
202 <td class="cond_line_{{loop.index0 % 3}}"></td>
204 <th class="left_border right_border vertical_borders" colspan=3>doables</th>
205 {% for condition in conditions_present %}
206 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}"></td>
208 <th colspan=2>comments</th>
210 {% for node in top_nodes %}
211 {{ show_node_undone(node, 0) }}
219 {% for node in top_nodes %}
220 {{ show_node_done(node, 0, []) }}
226 {{ macros.datalist_of_titles("processes", processes) }}