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="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 <tr class="toplevel">
146 {% if todo.dependers %}
148 {% for path in todo.shortened_depender_paths %}
151 <input name="depender" type="checkbox" value="{{path[-1].id_}}" checked/>
154 {% if not path[0] %}[…]<br />{% endif %}
155 {% for step in path %}
157 {% if step.dependers %}➛ {% endif %}<a href="todo?id={{step.id_}}">{{step.title}}</a><br />
164 add: <input name="depender" list="todos" autocomplete="off" />
168 <tr class="toplevel">
172 <tr class="lowlevel"><td colspan=4>expected:</td></tr>
173 {% for dep_slot in dep_slots %}
174 {% if dep_slot.todos %}
175 {{ draw_deps(dep_slot.todos) }}
177 <tr class="lowlevel">
181 {% if dep_slot.task.deps %} <details>
182 <summary>({{dep_slot.task.title.then}})</summary>
183 {% for task in dep_slot.task.deps %}
184 {{ task_with_deps(task, 1) }}
188 ({{dep_slot.task.title.then}})
194 {% if additional_deps %}
195 <tr class="lowlevel"><td colspan=4>bonus:</td></tr>
196 {{ draw_deps(additional_deps) }}
202 <tr class="toplevel">
205 {% if todo.task.deps %}
207 {% for dep in todo.task.deps %}
208 <tr class="lowlevel">
209 <td><input name="birth_dep" type="checkbox" value="{{dep.id_}}"></td>
211 <td><a href="task?id={{dep.id_}}">{{dep.title.then}}</a></td>
213 {% for suggested_todo in suggested_todos[dep.id_] %}
214 <tr class="lowlevel">
215 <td><input name="adopt_dep" type="checkbox" value="{{suggested_todo.id_}}" /></td>
217 <td><a href="todo?id={{suggested_todo.id_}}">{{suggested_todo.day.date}}:{{suggested_todo.title}}{% if suggested_todo.deps %}:+{% endif %}</a></td>
218 <td>{{suggested_todo.comment}}</td>
227 <tr class="toplevel">
230 make from task ({{ macros.parenthood_selector(parenthood) }}):<br />
231 <input name="birth_dep" list="tasks" size=100 autocomplete="off"><br />
233 <input name="adopt_dep" list="todos" size=100 autocomplete="off">
234 <datalist id="todos">
235 {% for t in filtered_todos %}
236 <option value="{{t.id_}}">
237 {{ macros.doneness_string(t, datalist_hack=true) }}
238 {{t.day.date}} {{t.title}} {{t.comment}}
241 {% for path in t.depender_paths %}
242 {{ path[0].title }}{% if path|count > 1 %}➛{% endif %}{% if path|count > 3 %}…➛{% endif %}{% if path|count > 1 %}{{ path[-1].title }}{% endif %}
250 {{ macros.datalist_tasks(filtered_tasks) }}
252 <tr class="toplevel">
256 {% for dep in todo.deps_chain %}
257 <tr class="lowlevel">
258 <td class="number">{{dep.deps_depth}}</td>
259 <td>{% if dep.deps_done %}{{ macros.doneness_string(dep) }}{% endif %}</td>
260 <td>{{ draw_todo(dep) }}</td>
268 <input id="update_button" class="update" name="update" type="submit" value="update" />
270 <input class="delete" type="submit" name="delete" value="delete" />