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 %}
36 {% for condition in conditions_present %}
37 <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>
40 <td class="todo_line">-></td>
41 <td class="todo_line"><input type="checkbox" {% if node.todo.is_done %}checked disabled{% endif %} {% if not node.todo.is_doable %}disabled{% endif %}/></td>
42 <td class="todo_line">
43 {% for i in range(indent) %} {% endfor %} +
44 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.process.title.newest|e}}</a>{% if node.seen %}){% endif %}
46 <td class="todo_line">-></td>
48 {% for condition in conditions_present|reverse %}
49 <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>
52 <td><input name="comment" /></td>
57 {% if not node.seen %}
58 {% for child in node.children %}
59 {{ show_node_undone(child, indent+1) }}
67 {% macro show_node_done(node, indent, path) %}
68 {% if node.todo.is_done %}
71 {% if path|length > 0 and not path[-1].todo.is_done %}
73 ({% for path_node in path %}<a href="todo?id={{path_node.todo.id_}}">{{path_node.todo.process.title.newest|e}}</a> <- {% endfor %})
82 {% for i in range(indent) %} {% endfor %} +
84 {% if node.seen %}({% endif %}<a href="todo?id={{node.todo.id_}}">{{node.todo.process.title.newest|e}}</a>{% if node.seen %}){% endif %}
89 {% if not node.seen %}
90 {% for child in node.children %}
91 {{ show_node_done(child, indent+1, path + [node]) }}
100 <h3>{{day.date}} / {{day.weekday}}</h3>
102 <a href="day?date={{day.prev_date}}">prev</a> | <a href="day?date={{day.next_date}}">next</a>
104 <form action="day?date={{day.date}}" method="POST">
105 comment: <input name="comment" value="{{day.comment|e}}" />
106 <input type="submit" value="OK" /><br />
107 add todo: <input name="new_todo" list="processes" autocomplete="off" />
108 <datalist id="processes">
109 {% for process in processes %}
110 <option value="{{process.id_}}">{{process.title.newest|e}}</option>
119 <th colspan={{ conditions_present|length}}>c</th>
120 <th colspan=4>states</th>
121 <th colspan={{ conditions_present|length}}>t</th>
125 {% for condition in conditions_present %}
126 {% set outer_loop = loop %}
129 {% for _ in conditions_present %}
130 {% if outer_loop.index > loop.index %}
131 <td class="cond_line_{{loop.index0 % 3}}">
133 <td class="cond_line_{{outer_loop.index0 % 3}}">
135 {% if outer_loop.index == loop.index %}
140 <td class="cond_line_{{loop.index0 % 3}}">[{% if condition.is_active %}X{% else %} {% endif %}]</td>
141 <td colspan=3 class="cond_line_{{loop.index0 % 3}}"><a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a></td>
143 {% for _ in conditions_present %}
144 {% if outer_loop.index0 + loop.index0 < conditions_present|length %}
145 <td class="cond_line_{{outer_loop.index0 % 3}}">
147 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}">
151 <td><input list="todos_for_{{condition.id_}}" /></td>
152 <datalist name="new_todo" id="todos_for_{{condition.id_}}" />
153 {% for process in enablers_for[condition.id_] %}
154 <option value="{{process.id_}}">{{process.title.newest|e}}</option>
162 {% for condition in conditions_present %}
163 <td class="cond_line_{{loop.index0 % 3}}"></td>
165 <th colspan={{ 4 }}>doables</th>
166 {% for condition in conditions_present %}
167 <td class="cond_line_{{(conditions_present|length - loop.index) % 3}}"></td>
171 {% for node in top_nodes %}
172 {{ show_node_undone(node, 0) }}
180 {% for node in top_nodes %}
181 {{ show_node_done(node, 0, []) }}