1 {% extends 'base.html' %}
11 border: 1px solid black;
17 background-color: #ffbbbb;
20 background-color: #bbffbb;
23 background-color: #bbbbff;
26 border-bottom: 1px solid #bbbbbb;
32 {% macro show_node_undone(node, indent) %}
33 {% if not node.todo.is_done %}
35 <input type="hidden" name="todo_id" value="{{node.todo.id_}}" />
37 {% for condition in conditions_present %}
38 <td class="cond_line_{{loop.index0 % 3}} {% if not condition.is_active %}min_width{% endif %}">{% if condition in node.todo.conditions %}{% if not condition.is_active %}O{% endif %}{% endif %}</td>
41 <td class="todo_line">-></td>
42 <td class="todo_line"><input name="done" type="checkbox" value="{{node.todo.id_}}" {% if node.todo.is_done %}checked disabled{% endif %} {% if not node.todo.is_doable %}disabled{% endif %}/></td>
43 <td class="todo_line">
44 {% for i in range(indent) %} {% endfor %} +
45 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.process.title.newest|e}}</a>{% if node.seen %}){% endif %}
47 <td class="todo_line">-></td>
49 {% for condition in conditions_present|reverse %}
50 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}} {% if condition in node.todo.enables or condition in node.todo.disables %}min_width{% endif %}">{% if condition in node.todo.enables %}+{% elif condition in node.todo.disables %}!{% endif %}</td>
53 <td><input name="comment" value="{{node.todo.comment|e}}" /></td>
58 {% if not node.seen %}
59 {% for child in node.children %}
60 {{ show_node_undone(child, indent+1) }}
68 {% macro show_node_done(node, indent, path) %}
69 {% if node.todo.is_done %}
72 {% if path|length > 0 and not path[-1].todo.is_done %}
74 ({% for path_node in path %}<a href="todo?id={{path_node.todo.id_}}">{{path_node.todo.process.title.newest|e}}</a> <- {% endfor %})
83 {% for i in range(indent) %} {% endfor %} +
85 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.process.title.newest|e}}</a> {% if node.todo.comment|length > 0 %}[{{node.todo.comment|e}}]{% endif %}{% if node.seen %}){% endif %}
90 {% if not node.seen %}
91 {% for child in node.children %}
92 {{ show_node_done(child, indent+1, path + [node]) }}
101 <h3>{{day.date}} / {{day.weekday}}</h3>
103 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
105 <form action="day?date={{day.date}}" method="POST">
106 comment: <input name="day_comment" value="{{day.comment|e}}" />
107 <input type="submit" value="OK" /><br />
108 add todo: <input name="new_todo" list="processes" autocomplete="off" />
109 <datalist id="processes">
110 {% for process in processes %}
111 <option value="{{process.id_}}">{{process.title.newest|e}}</option>
120 <th colspan={{ conditions_present|length}}>c</th>
121 <th colspan=4>states</th>
122 <th colspan={{ conditions_present|length}}>t</th>
126 {% for condition in conditions_present %}
127 {% set outer_loop = loop %}
130 {% for _ in conditions_present %}
131 {% if outer_loop.index > loop.index %}
132 <td class="cond_line_{{loop.index0 % 3}}">
134 <td class="cond_line_{{outer_loop.index0 % 3}}">
136 {% if outer_loop.index == loop.index %}
141 <td class="cond_line_{{loop.index0 % 3}}">[{% if condition.is_active %}X{% else %} {% endif %}]</td>
142 <td colspan=3 class="cond_line_{{loop.index0 % 3}}"><a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a></td>
144 {% for _ in conditions_present %}
145 {% if outer_loop.index0 + loop.index0 < conditions_present|length %}
146 <td class="cond_line_{{outer_loop.index0 % 3}}">
148 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">
152 <td><input name="new_todo" list="todos_for_{{condition.id_}}" autocomplete="off" /></td>
153 <datalist name="new_todo" id="todos_for_{{condition.id_}}" />
154 {% for process in enablers_for[condition.id_] %}
155 <option value="{{process.id_}}">{{process.title.newest|e}}</option>
163 {% for condition in conditions_present %}
164 <td class="cond_line_{{loop.index0 % 3}}"></td>
166 <th colspan={{ 4 }}>doables</th>
167 {% for condition in conditions_present %}
168 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}"></td>
172 {% for node in top_nodes %}
173 {{ show_node_undone(node, 0) }}
181 {% for node in top_nodes %}
182 {{ show_node_done(node, 0, []) }}