home · contact · privacy
Add foreign key restraints, expand and fix tests, add deletion and forking.
[misc] / todo_templates / tasks.html
index 29ae64f31ca1855c3ced973c39a9e41c6140f696..80f5a603efbd123a7d13e0954569bb61f0bbcbb5 100644 (file)
@@ -1,27 +1,42 @@
 {% extends 'base.html' %}
-{% block css %}
-table.alternating tr:nth-child(even) {
-    background-color: #f2f2f2;
-}
-table.alternating tr:nth-child(odd) {
-    background-color: #ffffff;
-}
-td.number { text-align: right; }
-{% endblock %}
+
+
+
 {% block content %}
-<form action="{{action|e}}" method="POST">
+<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') %}
+<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 }}</a></td>
-<td><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>
+<td class="number">
+{{ '{:5.1f}'.format(t.default_effort.now) }}
+</td>
+<td class="number">
+{{ '{:5.1f}'.format(t.deps_weight) }}
+</td>
+<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>
 {% endif %}
 {% endfor %}
 </table>
+
 {% endblock %}