home · contact · privacy
Add foreign key restraints, expand and fix tests, add deletion and forking.
[misc] / todo_templates / tasks.html
index ed01d3071646d0adf58ea6658e23347b4ca5400b..80f5a603efbd123a7d13e0954569bb61f0bbcbb5 100644 (file)
@@ -1,49 +1,42 @@
 {% extends 'base.html' %}
-{% block css %}
-table.alternating tr:nth-child(even) {
-    background-color: #cccccc;
-}
-table.alternating tr:nth-child(odd) {
-    background-color: #ffffff;
-}
-td.number { text-align: right; }
-tr.expanded { color: #888888; }
-{% endblock %}
+
+
+
 {% block content %}
+<h3>review tasks</h3>
+
 <form action="tasks" method="POST">
 {% include 'tagfilters.html' %}
+<br />
+match: <input name="search" value="{{search|e}}" />
+<input id="filter_button" type="submit" name="filter" value="match" />
 </form>
-<table class="alternating">
-<tr><th>default<br />effort</th><th>task</th><th>tags</th></tr>
 
-{% for uuid, t in db.tasks.items() | sort(attribute='1.title.now') %}
+<table class="alternating">
+<tr>
+{{ macros.sort_head(sort, "default_effort", "effort") }}
+{{ macros.sort_head(sort, "weight", "weight") }}
+{{ macros.sort_head(sort, "title", "task") }}
+{{ macros.sort_head(sort, "latest_effort_date", "last todo") }}
+<th>tags</th>
+</tr>
+{% for t in tasks %}
 {% if t.visible %}
-
 <tr>
-<td class="number">{{ t.default_effort.now }}</a></td>
+<td class="number">
+{{ '{:5.1f}'.format(t.default_effort.now) }}
+</td>
+<td class="number">
+{{ '{:5.1f}'.format(t.deps_weight) }}
+</td>
 <td>
-{% if uuid == expand_uuid %}
-<a href="{{db.prefix}}/tasks">[-]</a>
-{% elif t.subtasks|count > 0 %}
-<a href="{{db.prefix}}/tasks?expand_uuid={{uuid}}">[+]</a>
-{% endif %}
-<a href="{{db.prefix}}/task?id={{ uuid }}" />{{ t.title.now|e }}</a></td>
-<td>{% for tag in t.tags.now | sort %}<a href="{{db.prefix}}/tasks?t_and={{tag|e}}">{{ tag }}</a> {% endfor %}</td>
+<a href="task?id={{ t.id_ }}" />{{ t.title.now|e }}</a></td>
+<td>{{ t.latest_effort_date }}</td>
+<td>{% for tag in t.tags.now | sort %}<a href="tasks?and_tag={{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.now|e }}</a></td>
-<td>{% for tag in t.tags.now | sort %}<a href="{{db.prefix}}/tasks?t_and={{tag|e}}">{{ tag }}</a> {% endfor %}</td>
-</tr>
-{% endfor %}
-{% endif %}
-
 {% endif %}
 {% endfor %}
-
 </table>
+
 {% endblock %}