X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=templates%2Fday.html;h=efa1c9bb1e78fc5ea455c5a678b4727fb22efdd3;hb=fb317a554ed912736498a5b3917b40bb9bfd7489;hp=0953d52446555fb695f021121ac3c9798827597d;hpb=63249f5d7cefb97574610848ca3473cb1f9687e2;p=plomtask diff --git a/templates/day.html b/templates/day.html index 0953d52..efa1c9b 100644 --- a/templates/day.html +++ b/templates/day.html @@ -1,12 +1,50 @@ {% extends 'base.html' %} -{% macro todo_with_children(todo, indent) %} -
  • {% for i in range(indent) %}+{% endfor %}{{todo.process.title.newest|e}} -{% for child in todo.children %} -{{ todo_with_children(child, indent+1) }} + +{% macro show_node(node, indent) %} +{% if node.is_todo %} +{% for i in range(indent) %}  {% endfor %} + +{% if node.seen %}({% else %}{% endif %}{{node.item.process.title.newest|e}}{% if node.seen %}){% else %}{% endif %} +{% else %} +{% for i in range(indent) %} {% endfor %} + +{% if node.seen %}({% else %}{% endif %}{{node.item.title.newest|e}}{% if node.seen %}){% else %}{% endif %} +{% endif %} +{% endmacro %} + + +{% macro undone_with_children(node, indent) %} +{% if not node.hide %} + + +{% if node.is_todo %} + +{% endif %} + + +{{ show_node(node, indent) }} + + +{% endif %} +{% for child in node.children %} +{{ undone_with_children(child, indent+1) }} +{% endfor %} +{% endmacro %} + + +{% macro done_with_children(node, indent) %} +{% if not node.hide %} + + +{{ show_node(node, indent) }} + + +{% endif %} +{% for child in node.children %} +{{ done_with_children(child, indent+1) }} {% endfor %} {% endmacro %} + {% block content %}

    {{day.date}} / {{day.weekday}}

    @@ -21,11 +59,30 @@ add todo: {% endfor %} - +

    conditions

    +

    to do

    + +{% for node in todo_trees %} +{{ undone_with_children(node, indent=0) }} +{% endfor %} +
    +

    done

    + +{% for node in done_trees %} +{{ done_with_children(node, indent=0) }} +{% endfor %} +
    + {% endblock %}