home · contact · privacy
Improve day done tree display.
[plomtask] / templates / day.html
index 627923b2a2b34c75d57f204f97a2d5b86a729c33..3b2e96a9114fb819a03b9e79d05489b4ad08cc91 100644 (file)
@@ -16,11 +16,11 @@ th {
 }
 td.cond_line_0 {
   border-top: 1px solid white;
-  background-color: #dddddd;
+  background-color: #bfbfbf;
 }
 td.cond_line_1 {
   border-top: 1px solid white;
-  background-color: #efefef;
+  background-color: #dfdfdf;
 }
 td.cond_line_2 {
   border-top: 1px solid white;
@@ -33,11 +33,14 @@ td.cond_line_corner {
   text-overflow: clip;
 }
 td.todo_line {
-  border-bottom: 1px solid #dddddd;
+  border-bottom: 1px solid #bfbfbf;
   height: 1.7em;
 }
 tr.inactive td.todo_line {
-  background-color: #dddddd;
+  background-color: #bfbfbf;
+}
+tr.hidden_undone td, tr.hidden_undone a {
+  color: #9f9f9f;
 }
 td.left_border {
   border-left: 1px solid black;
@@ -110,33 +113,21 @@ O 
 
 
 {% macro show_node_done(node, indent, path) %}
-{% if node.todo.is_done %}
-
-<tr>
-{% if path|length > 0 and not path[-1].todo.is_done %}
-<td>
-({% for path_node in path %}<a href="todo?id={{path_node.todo.id_}}">{{path_node.todo.title_then|e}}</a>  &lt;- {% endfor %})
-</td>
-</tr>
-
-<tr>
+{% if node.todo.has_doneness_in_path %}
+<tr{% if not node.todo.is_done %} class="hidden_undone"{% endif %}>
 <td>
-&nbsp; +
-{% else %}
-<td>
-{% for i in range(indent) %}&nbsp; {% endfor %} +
-{% endif %}
-{% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a> {% if node.todo.comment|length > 0 %}[{{node.todo.comment|e}}]{% endif %}{% if node.seen %}){% endif %}
+{% for i in range(indent) %}&nbsp; &nbsp; {% endfor %} +
+{% if not node.todo.is_done %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.title_then|e}}</a>{% if not node.todo.is_done %}){% endif %}
 </td>
+<td>{{node.todo.comment|e}}</td>
 </tr>
 
-{% endif %}
 {% if not node.seen %}
 {% for child in node.children %}
-{{ show_node_done(child, indent+1, path + [node]) }}
+{{ show_node_done(child, indent+1) }}
 {% endfor %}
 {% endif %}
-
+{% endif %}
 {% endmacro %}