<table class="alternating">
<tr>
-<th class="centered{% if sort=='default_effort' %} desc{% endif %}">
-<a href="?sort=default_effort">effort</a>
-</th>
-<th {% if sort=='depth' %}class ="desc"{% endif %}>
-<a href="?sort=depth">depth</a>
-</th>
-<th {% if sort=='title' %}class="desc"{% endif %}>
-<a href="?sort=title">todo</a>
-</th>
+{{ macros.sort_head(sort, "default_effort", "effort") }}
+{{ macros.sort_head(sort, "weight", "weight") }}
+{{ macros.sort_head(sort, "title", "task") }}
<th>tags</th>
</tr>
{% for t in tasks %}
{{ '{:5.1f}'.format(t.default_effort.now) }}
</td>
<td class="number">
-{{ '{:5.1f}'.format(t.subtask_depth) }}
+{{ '{:5.1f}'.format(t.subtask_weight) }}
</td>
<td>
<a href="task?id={{ t.id_ }}" />{{ t.title.now|e }}</a></td>