1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
8 border: 1px solid black;
12 border-top: 1px solid white;
15 background-color: #bfbfbf;
18 background-color: #dfdfdf;
21 background-color: fffff;
30 border-bottom: 1px solid #bfbfbf;
33 tr.inactive > td.todo_line {
34 background-color: #bfbfbf;
35 border-bottom: 1px solid white;
37 tr.hidden_undone > td, tr.hidden_undone a {
41 border-left: 1px solid black;
44 border-right: 1px solid black;
53 {% macro show_node_undone(node, indent) %}
54 {% if not node.todo.is_done %}
55 <tr {% if node.seen or not node.todo.is_doable %}class="inactive"{% endif %}>
56 {% if not node.seen %}
57 <input type="hidden" name="todo_id" value="{{node.todo.id_}}" />
60 {% for condition in conditions_present %}
61 {% if condition in node.todo.conditions and not condition.is_active %}
62 <td class="cond_line cond_{{loop.index0 % 3}}">
64 {% elif condition in node.todo.blockers and condition.is_active %}
65 <td class="cond_line cond_{{loop.index0 % 3}}">
68 <td class="cond_line cond_{{loop.index0 % 3}} cond_shrink">
75 <td class="todo_line left_border"></td>
76 <td class="todo_line">{% if node.todo.effort %}{{ node.todo.effort }}{% endif %}</td>
78 <td class="todo_line left_border"><input name="done" type="checkbox" value="{{node.todo.id_}}" {% if not node.todo.is_doable %}disabled{% endif %}/></td>
79 <td class="todo_line"><input name="effort" type="number" step=0.1 placeholder={{node.todo.effort_then}} value={{node.todo.effort}} /></td>
81 <td class="todo_line right_border">
82 {% for i in range(indent) %} {% endfor %} +
83 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a>{% if node.seen %}){% endif %}
86 {% for condition in conditions_present|reverse %}
87 {% if condition in node.todo.enables %}
88 <td class="cond_line cond_{{(conditions_present|length - loop.index) % 3}}">
90 {% elif condition in node.todo.disables %}
91 <td class="cond_line cond_{{(conditions_present|length - loop.index) % 3}}">
94 <td class="cond_line cond_{{(conditions_present|length - loop.index) % 3}} cond_shrink">
102 {{node.todo.comment|e}}
104 <input name="comment" type="text" value="{{node.todo.comment|e}}" />
111 {% if not node.seen %}
112 {% for child in node.children %}
113 {{ show_node_undone(child, indent+1) }}
121 {% macro show_node_done(node, indent, path) %}
122 {% if node.todo.has_doneness_in_path %}
123 <tr{% if not node.todo.is_done %} class="hidden_undone"{% endif %}>
124 <td class="number">{{ '{:4.1f}'.format(node.todo.performed_effort) }}</td>
125 <td class="number">{{ '{:4.1f}'.format(node.todo.tree_effort) }}</td>
127 {% for i in range(indent) %} {% endfor %} +
128 {% if not node.todo.is_done %}({% endif %}{% if node.seen %}[{% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a>{% if node.seen %}]{% endif %}{% if not node.todo.is_done %}){% endif %}{% if node.todo.comment %} · {{node.todo.comment|e}}{% endif %}</td>
130 {% if not node.seen %}
131 {% for child in node.children %}
132 {{ show_node_done(child, indent+1) }}
141 <h3>{{day.date}} / {{day.weekday}} ({{day.total_effort|round(1)}})</h3>
143 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
145 <form action="day?date={{day.date}}" method="POST">
149 <input name="day_comment" type="text" value="{{day.comment|e}}" />
150 <input type="submit" value="OK" /></td>
156 add: <input type="text" name="new_todo" list="processes">
160 <select name="make_type">
161 <option value="full">with</option>
162 <option value="empty"{% if make_type == "empty" %}selected {% endif %}>without</option>
164 descendants (i.e. adopt where possible, otherwise create anew)
170 <th colspan={{ conditions_present|length + 3 + conditions_present|length }}>conditions</th>
172 <th>add disabler</th>
175 {% for condition in conditions_present %}
176 {% set outer_loop = loop %}
179 {% for _ in conditions_present %}
180 {% if outer_loop.index > loop.index %}
181 <td class="cond_line cond_{{loop.index0 % 3}} cond_shrink">|
182 {% elif outer_loop.index < loop.index %}
183 <td class="cond_line cond_{{outer_loop.index0 % 3}}">
185 <td class="cond_line cond_{{outer_loop.index0 % 3}} cond_shrink">/
190 <td class="cond_line cond_{{loop.index0 % 3}}"><input type="checkbox" disabled{% if condition.is_active %} checked{% endif %}></td>
191 <td colspan=2 class="cond_line cond_{{loop.index0 % 3}}"><a href="condition?id={{condition.id_}}">{{condition.title.at(day.date)|e}}</a></td>
193 {% for _ in conditions_present %}
194 {% if outer_loop.index0 + loop.index < conditions_present|length %}
195 <td class="cond_line cond_{{outer_loop.index0 % 3}}">
196 {% elif outer_loop.index0 + loop.index > conditions_present|length %}
197 <td class="cond_line cond_{{(conditions_present|length - loop.index) % 3}} cond_shrink"> |
199 <td class="cond_line cond_{{outer_loop.index0 % 3}} cond_shrink"> \
203 {% set list_name = "todos_for_%s"|format(condition.id_) %}
204 <td><input class="ablers" type="text" name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
205 {{ macros.datalist_of_titles(list_name, enablers_for[condition.id_]) }}
207 {% set list_name = "todos_against_%s"|format(condition.id_) %}
208 <td><input class="ablers" type="text" name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
209 {{ macros.datalist_of_titles(list_name, disablers_for[condition.id_]) }}
215 {% for condition in conditions_present %}
216 <td class="cond_line cond_{{loop.index0 % 3}} cond_shrink">|</td>
218 <th colspan=3>doables</th>
219 {% for condition in conditions_present %}
220 <td class="cond_line cond_{{(conditions_present|length - loop.index) % 3}} cond_shrink"> |</td>
222 <th colspan=2>comments</th>
224 {% for node in top_nodes %}
225 {{ show_node_undone(node, 0) }}
232 <table class="alternating">
234 <th colspan=2>effort</th><th rowspan=2>action · comment</th>
237 <th>self</th><th>tree</th>
239 {% for node in top_nodes %}
240 {{ show_node_done(node, 0, []) }}
246 {{ macros.datalist_of_titles("processes", processes) }}