{% extends 'base.html' %}
+{% macro todo_with_children(todo, indent) %}
+<li>{% for i in range(indent) %}+{% endfor %}<a href="todo?id={{todo.id_}}">{{todo.process.title.newest|e}}</a>
+{% for child in todo.children %}
+{{ todo_with_children(child, indent+1) }}
+{% endfor %}
+{% endmacro %}
+
{% block content %}
<h3>{{day.date}} / {{day.weekday}}</h3>
<p>
</form>
<ul>
{% for todo in todos %}
-<li><a href="todo?id={{todo.id_}}">{{todo.process.title.newest|e}}</a>
+{{ todo_with_children(todo, 0) }}
{% endfor %}
</ul>
{% endblock %}