home · contact · privacy
Improve accounting scripts.
[misc] / todo_templates / tasks.html
index 34976eb5396278b803711111bafc48ab57f03416..7943b8231eb233630ac3871f0687186960ba8a89 100644 (file)
@@ -1,27 +1,49 @@
 {% extends 'base.html' %}
 {% block css %}
 table.alternating tr:nth-child(even) {
-    background-color: #f2f2f2;
+    background-color: #cccccc;
 }
 table.alternating tr:nth-child(odd) {
     background-color: #ffffff;
 }
 td.number { text-align: right; }
+tr.expanded { color: #888888; }
 {% endblock %}
 {% block content %}
 <form action="{{action|e}}" method="POST">
 {% include 'tagfilters.html' %}
 </form>
 <table class="alternating">
-<tr><th>default<br />weight</th><th>task</th><th>tags</th></tr>
+<tr><th>default<br />effort</th><th>task</th><th>tags</th></tr>
+
 {% for uuid, t in db.tasks.items() | sort(attribute='1.title') %}
 {% if t.visible %}
+
 <tr>
-<td class="number">{{ t.default_weight }}</a></td>
-<td><a href="{{db.prefix}}/task?id={{ uuid }}" />{{ t.title|e }}</a></td>
+<td class="number">{{ t.default_effort }}</a></td>
+<td>
+{% if uuid == expand_uuid %}
+<a href="{{db.prefix}}/tasks">[-]</a>
+{% elif t.links|count > 0 %}
+<a href="{{db.prefix}}/tasks?expand_uuid={{uuid}}">[+]</a>
+{% endif %}
+<a href="{{db.prefix}}/task?id={{ uuid }}" />{{ t.title|e }}</a></td>
+<td>{% for tag in t.tags | sort %}<a href="{{db.prefix}}/tasks?t_and={{tag|e}}">{{ tag }}</a> {% endfor %}</td>
+</tr>
+
+{% if uuid == expand_uuid %}
+{% for uuid, t in expanded_tasks.items() %}
+<tr class="expanded">
+<td class="number">{{ t.default_effort }}</a></td>
+<td>&nbsp; [+] <a href="{{db.prefix}}/task?id={{ uuid }}" />{{ t.title|e }}</a></td>
 <td>{% for tag in t.tags | sort %}<a href="{{db.prefix}}/tasks?t_and={{tag|e}}">{{ tag }}</a> {% endfor %}</td>
+</tr>
+{% endfor %}
+{% endif %}
+
 {% endif %}
 {% endfor %}
+
 </table>
 {% endblock %}