1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
8 border: 1px solid black;
12 border-top: 1px solid white;
13 background-repeat: no-repeat;
16 background-image: linear-gradient(to right, black 0.2em, transparent 0);
19 background-image: linear-gradient(to left, black 0.2em, transparent 0);
22 background-color: #bfbfbf;
25 background-color: #dfdfdf;
28 background-color: fffff;
37 background-image: linear-gradient(145deg, transparent 60%, black 60%, black 70%, transparent 70%);
39 td.cond_corner_right {
40 background-image: linear-gradient(35deg, transparent 30%, black 30%, black 40%, transparent 40%);
43 border-bottom: 1px solid #bfbfbf;
46 tr.inactive > td.todo_line {
47 background-color: #bfbfbf;
48 border-bottom: 1px solid white;
50 tr.hidden_undone > td, tr.hidden_undone a {
54 border-left: 1px solid black;
57 border-right: 1px solid black;
66 {% macro show_node_undone(node, indent) %}
67 {% if not node.todo.is_done %}
68 <tr {% if node.seen or not node.todo.is_doable %}class="inactive"{% endif %}>
69 {% if not node.seen %}
70 <input type="hidden" name="todo_id" value="{{node.todo.id_}}" />
73 {% for condition in conditions_present %}
74 <td class="cond_line cond_{{loop.index0 % 3}} cond_line_left">
75 {% if condition in node.todo.conditions and not condition.is_active %}
77 {% elif condition in node.todo.blockers and condition.is_active %}
84 <td class="todo_line left_border"></td>
85 <td class="todo_line">{% if node.todo.effort %}{{ node.todo.effort }}{% endif %}</td>
87 <td class="todo_line left_border"><input name="done" type="checkbox" value="{{node.todo.id_}}" {% if not node.todo.is_doable %}disabled{% endif %}/></td>
88 <td class="todo_line"><input name="effort" type="number" step=0.1 placeholder={{node.todo.effort_then}} value={{node.todo.effort}} /></td>
90 <td class="todo_line right_border">
91 {% for i in range(indent) %} {% endfor %} +
92 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a>{% if node.seen %}){% endif %}
95 {% for condition in conditions_present|reverse %}
96 <td class="cond_line cond_{{(conditions_present|length - loop.index) % 3}} cond_line_right">{% if condition in node.todo.enables %}+>{% elif condition in node.todo.disables %}->{% endif %}</td>
101 {{node.todo.comment|e}}
103 <input name="comment" type="text" value="{{node.todo.comment|e}}" />
110 {% if not node.seen %}
111 {% for child in node.children %}
112 {{ show_node_undone(child, indent+1) }}
120 {% macro show_node_done(node, indent, path) %}
121 {% if node.todo.has_doneness_in_path %}
122 <tr{% if not node.todo.is_done %} class="hidden_undone"{% endif %}>
123 <td class="number">{{ '{:4.1f}'.format(node.todo.performed_effort) }}</td>
124 <td class="number">{{ '{:4.1f}'.format(node.todo.tree_effort) }}</td>
126 {% for i in range(indent) %} {% endfor %} +
127 {% 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>
129 {% if not node.seen %}
130 {% for child in node.children %}
131 {{ show_node_done(child, indent+1) }}
140 <h3>{{day.date}} / {{day.weekday}} ({{day.total_effort|round(1)}})</h3>
142 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
144 <form action="day?date={{day.date}}" method="POST">
148 <input name="day_comment" type="text" value="{{day.comment|e}}" />
149 <input type="submit" value="OK" /></td>
155 add: <input type="text" name="new_todo" list="processes">
159 <select name="make_type">
160 <option value="full">with</option>
161 <option value="empty"{% if make_type == "empty" %}selected {% endif %}>without</option>
163 descendants (i.e. adopt where possible, otherwise create anew)
169 <th colspan={{ conditions_present|length + 3 + conditions_present|length }}>conditions</th>
171 <th>add disabler</th>
174 {% for condition in conditions_present %}
175 {% set outer_loop = loop %}
178 {% for _ in conditions_present %}
179 {% if outer_loop.index > loop.index %}
180 <td class="cond_line cond_{{loop.index0 % 3}} cond_line_left">
181 {% elif outer_loop.index < loop.index %}
182 <td class="cond_line cond_{{outer_loop.index0 % 3}}">
184 <td class="cond_line cond_{{outer_loop.index0 % 3}} cond_corner cond_corner_left">
189 <td class="cond_line cond_{{loop.index0 % 3}}"><input type="checkbox" disabled{% if condition.is_active %} checked{% endif %}></td>
190 <td colspan=2 class="cond_line cond_{{loop.index0 % 3}}"><a href="condition?id={{condition.id_}}">{{condition.title.at(day.date)|e}}</a></td>
192 {% for _ in conditions_present %}
193 {% if outer_loop.index0 + loop.index < conditions_present|length %}
194 <td class="cond_line cond_{{outer_loop.index0 % 3}}">
195 {% elif outer_loop.index0 + loop.index > conditions_present|length %}
196 <td class="cond_line cond_{{(conditions_present|length - loop.index) % 3}} cond_line_right">
198 <td class="cond_line cond_{{outer_loop.index0 % 3}} cond_corner cond_corner_right">
202 {% set list_name = "todos_for_%s"|format(condition.id_) %}
203 <td><input class="ablers" type="text" name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
204 {{ macros.datalist_of_titles(list_name, enablers_for[condition.id_]) }}
206 {% set list_name = "todos_against_%s"|format(condition.id_) %}
207 <td><input class="ablers" type="text" name="new_todo" list="{{list_name}}" autocomplete="off" /></td>
208 {{ macros.datalist_of_titles(list_name, disablers_for[condition.id_]) }}
214 {% for condition in conditions_present %}
215 <td class="cond_line cond_{{loop.index0 % 3}} cond_line_left"></td>
217 <th colspan=3>doables</th>
218 {% for condition in conditions_present %}
219 <td class="cond_line cond_{{(conditions_present|length - loop.index) % 3}} cond_line_right"></td>
221 <th colspan=2>comments</th>
223 {% for node in top_nodes %}
224 {{ show_node_undone(node, 0) }}
231 <table class="alternating">
233 <th colspan=2>effort</th><th rowspan=2>action · comment</th>
236 <th>self</th><th>tree</th>
238 {% for node in top_nodes %}
239 {{ show_node_done(node, 0, []) }}
245 {{ macros.datalist_of_titles("processes", processes) }}