1 {% extends 'base.html' %}
6 tr.toplevel th { padding-right: 1em; }
7 td.center { text-align: center; }
8 tr.toplevel td, tr.toplevel th { padding-top: 1em; }
9 tr.lowlevel td, tr.lowlevel th { padding-top: 0em; }
10 tr.grey td { background-color: #cccccc; }
15 {% macro draw_todo(todo) %}<a href="?id={{todo.id_}}">{{todo.title}}</a>{% if todo.comment %}({{todo.comment|e}}){% endif %}{% endmacro %}
19 {% macro task_with_deps(task, indent) %}
20 {% for i in range(indent) %} {% endfor %}+
21 ({{task.title.then}})<br />
22 {% for t in task.deps %}
23 {{ task_with_deps(t, indent+1) }}
29 {% macro todo_with_deps(todo, indent) %}
30 {% for i in range(indent) %} {% endfor %}{{ macros.doneness_string(todo) }} {{ draw_todo(todo) }}<br />
31 {% for dep in todo.deps %}
32 {% if dep.been_observed %}
33 {% for i in range(indent+1) %} {% endfor %}{{ macros.doneness_string(dep) }} ({{ draw_todo(dep) }})<br />
35 {{ todo_with_deps(dep, indent+1) }}
43 {% macro draw_deps(deps) %}
46 <td><input name="adopt_dep" type="checkbox" value="{{t.id_}}" checked/></td>
47 <td>{{ macros.doneness_string(t) }}</td>
49 {% if t.deps and not t.been_observed %}
51 <summary>{{ draw_todo(t) }}</summary>
52 {% for dep in t.deps %}
53 {{ todo_with_deps(dep, 0) }}
70 <form action="todo" method="POST">
71 <input type="hidden" name="todo_id" value="{{todo.id_}}" />
72 <input type="hidden" name="importance" step=0.1 size=8 value="{{ todo.importance }}" />
78 <a href="task?id={{ todo.task.id_ }}">{{ todo.task.title.then|e }}</a>
79 {% if todo.task.comment %}
80 <pre>{{ todo.task.comment|e }}</pre>
90 <input type="checkbox" name="done" {% if todo.done %}checked{% endif %} {% if todo.deps_done == false %}disabled{% endif %}/>
92 (all days: {{todo.all_days_effort}})<br />
93 (dependencies: {{todo.all_days_effort}})
102 {% for date, effort in todo.efforts.items() %}
103 <tr class="lowlevel">
105 <input name="effort_date" type="hidden" value="{{date}}">{{date}}
108 <input type="number" name="effort" step=0.1 size=8 value="{{effort}}" placeholder="{{todo.default_effort}}" {% if todo.deps and effort %}disabled{% endif %} />
111 {% if not (todo.deps and effort) %}<input type="checkbox" name="delete_effort" value="{{date}}" />{% endif %}
115 <tr class="lowlevel">
117 <input name="effort_date" size=10 value="">
120 <input type="number" name="effort" step=0.1 size=8 value="" {% if todo.deps %} disabled {% else %} placeholder="{{todo.default_effort}}" {% endif %} />
127 <tr class="toplevel">
129 <td class="input" colspan=2>
130 <input name="comment" size=100 value="{{todo.comment|e}}" />
134 <tr class="toplevel">
137 new: {{ macros.tagselection(submit_name='tag', selected_tags=todo.day_tags, all_tags=tags) }}
138 {% for tag in todo.task.tags.now | sort %}<select disabled><option>{{ tag }}</option></select>{% endfor %}
143 {% if todo.dependers %}
144 <tr class="toplevel">
148 {% for path in todo.shortened_depender_paths %}
151 {% if not path[0] %}[…]<br />{% endif %}
152 {% for step in path %}
154 {% if step.dependers %}➛ {% endif %}<a href="todo?id={{step.id_}}">{{step.title}}</a><br />
164 <tr class="toplevel">
168 <tr class="lowlevel"><td colspan=4>expected:</td></tr>
169 {% for dep_slot in dep_slots %}
170 {% if dep_slot.todos %}
171 {{ draw_deps(dep_slot.todos) }}
173 <tr class="lowlevel">
177 {% if dep_slot.task.deps %} <details>
178 <summary>({{dep_slot.task.title.then}})</summary>
179 {% for task in dep_slot.task.deps %}
180 {{ task_with_deps(task, 1) }}
184 ({{dep_slot.task.title.then}})
190 {% if additional_deps %}
191 <tr class="lowlevel"><td colspan=4>bonus:</td></tr>
192 {{ draw_deps(additional_deps) }}
198 <tr class="toplevel">
201 {% if todo.task.deps %}
203 {% for dep in todo.task.deps %}
204 <tr class="lowlevel">
205 <td><input name="birth_dep" type="checkbox" value="{{dep.id_}}"></td>
207 <td><a href="task?id={{dep.id_}}">{{dep.title.then}}</a></td>
209 {% for suggested_todo in suggested_todos[dep.id_] %}
210 <tr class="lowlevel">
211 <td><input name="adopt_dep" type="checkbox" value="{{suggested_todo.id_}}" /></td>
213 <td><a href="todo?id={{suggested_todo.id_}}">{{suggested_todo.day.date}}:{{suggested_todo.title}}{% if suggested_todo.deps %}:+{% endif %}</a></td>
214 <td>{{suggested_todo.comment}}</td>
223 <tr class="toplevel">
226 make from task:<br />
227 <input name="birth_dep" list="tasks" size=100 autocomplete="off"><br />
229 <input name="adopt_dep" list="todos" size=100 autocomplete="off">
230 <datalist id="todos">
231 {% for t in filtered_todos %}
232 <option value="{{t.id_}}">
233 {{ macros.doneness_string(t, datalist_hack=true) }}
234 {{t.day.date}} {{t.title}} {{t.comment}}
237 {% for path in t.depender_paths %}
238 {{ path[0].title }}{% if path|count > 1 %}➛{% endif %}{% if path|count > 3 %}…➛{% endif %}{% if path|count > 1 %}{{ path[-1].title }}{% endif %}
246 {{ macros.datalist_tasks(filtered_tasks) }}
248 <tr class="toplevel">
252 {% for dep in todo.deps_chain %}
253 <tr class="lowlevel">
254 <td class="number">{{dep.deps_depth}}</td>
255 <td>{% if dep.deps_done %}{{ macros.doneness_string(dep) }}{% endif %}</td>
256 <td>{{ draw_todo(dep) }}</td>
264 <input id="update_button" class="update" name="update" type="submit" value="update" />
266 <input class="delete" type="submit" name="delete" value="delete" />