+
+
+{% block css %}
+td, th, tr, table {
+ padding: 0;
+ margin: 0;
+}
+table {
+ border-collapse: collapse;
+}
+th {
+ border: 1px solid black;
+}
+td.cond_line_0 {
+ border-top: 1px solid white;
+ background-color: #bfbfbf;
+}
+td.cond_line_1 {
+ border-top: 1px solid white;
+ background-color: #dfdfdf;
+}
+td.cond_line_2 {
+ border-top: 1px solid white;
+ background-color: #fffff;
+}
+td.cond_line_corner {
+ max-width: 0px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: clip;
+}
+td.todo_line {
+ border-bottom: 1px solid #bfbfbf;
+ height: 1.7em;
+}
+tr.inactive td.todo_line {
+ background-color: #bfbfbf;
+}
+tr.hidden_undone td, tr.hidden_undone a {
+ color: #9f9f9f;
+}
+td.left_border {
+ border-left: 1px solid black;
+}
+td.right_border {
+ border-right: 1px solid black;
+}
+input[type="text"] {
+ width: 98%;
+}
+input[name="day_comment"] {
+ width: 100em;
+}
+{% endblock %}
+
+
+
+{% macro show_node_undone(node, indent) %}
+{% if not node.todo.is_done %}
+<tr {% if node.seen or not node.todo.is_doable %}class="inactive"{% endif %}>
+{% if not node.seen %}
+<input type="hidden" name="todo_id" value="{{node.todo.id_}}" />
+{% endif %}
+
+{% for condition in conditions_present %}
+<td class="cond_line_{{loop.index0 % 3}}">
+{% if condition in node.todo.conditions and not condition.is_active %}
+O
+{% elif condition in node.todo.blockers and condition.is_active %}
+!
+{% endif %}
+</td>
+{% endfor %}
+
+{% if node.seen %}
+<td class="todo_line left_border"></td>
+<td class="todo_line">{% if node.todo.effort %}{{ node.todo.effort }}{% endif %}</td>
+{% else %}
+<td class="todo_line left_border"><input name="done" type="checkbox" value="{{node.todo.id_}}" {% if not node.todo.is_doable %}disabled{% endif %}/></td>
+<td class="todo_line"><input name="effort" type="number" step=0.1 size=5 placeholder={{node.todo.effort_then}} value={{node.todo.effort}} /></td>
+{% endif %}
+<td class="todo_line right_border">
+{% for i in range(indent) %} {% endfor %} +
+{% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a>{% if node.seen %}){% endif %}
+</td>
+
+{% for condition in conditions_present|reverse %}
+<td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">{% if condition in node.todo.enables %} +{% elif condition in node.todo.disables %} !{% endif %}</td>
+{% endfor %}
+
+<td colspan=2>
+{% if node.seen %}
+{{node.todo.comment|e}}
+{% else %}
+<input name="comment" type="text" value="{{node.todo.comment|e}}" />
+{% endif %}
+</td>
+
+</tr>
+{% endif %}
+
+{% if not node.seen %}
+{% for child in node.children %}
+{{ show_node_undone(child, indent+1) }}