home · contact · privacy
Refactor templates.
[plomtask] / templates / todo.html
1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
3
4
5
6 {% block content %}
7 <h3>Todo: {{todo.process.title.newest|e}}</h3>
8 <form action="todo?id={{todo.id_}}" method="POST">
9 <table>
10
11 <tr>
12 <th>day</th>
13 <td><a href="day?date={{todo.date}}">{{todo.date}}</a></td>
14 </tr>
15
16 <tr>
17 <th>process</th>
18 <td><a href="process?id={{todo.process.id_}}">{{todo.process.title.newest|e}}</a></td>
19 </tr>
20
21 <tr>
22 <th>done</th>
23 <td><input type="checkbox" name="done" {% if todo.is_done %}checked {% endif %} {% if not todo.is_doable %}disabled {% endif %}/><br /></td>
24 </tr>
25
26 <tr>
27 <th>comment</th>
28 <td><input name="comment" value="{{todo.comment|e}}"/></td>
29 </tr>
30
31 <tr>
32 <th>conditions</th>
33 <td>{{ macros.simple_checkbox_table("condition", todo.conditions, "condition", "condition_candidates") }}</td>
34 </tr>
35
36 <tr>
37 <th>enables</th>
38 <td>{{ macros.simple_checkbox_table("enables", todo.enables, "condition", "condition_candidates") }}</td>
39 </tr>
40
41 <tr>
42 <th>disables</th>
43 <td>{{ macros.simple_checkbox_table("disables", todo.disables, "condition", "condition_candidates") }}</td>
44 </tr>
45
46 <tr>
47 <th>parents</th>
48 <td>
49 {% for parent in todo.parents %}
50 <a href="todo?id={{parent.id_}}">{{parent.process.title.newest|e}}</a><br />
51 {% endfor %}
52 </td>
53 </tr>
54
55 <tr>
56 <th>children</th>
57 <td>
58 <table>
59 {% for child in todo.children %}
60 <tr>
61 <td><input type="checkbox" name="adopt" value="{{child.id_}}" checked /></td>
62 <td><a href="todo?id={{child.id_}}">{{child.process.title.newest|e}}</a></td>
63 </tr>
64 {% endfor %}
65 </table>
66 adopt: <input name="adopt" list="todo_candidates" autocomplete="off" />
67 </td>
68 </tr>
69
70 </table>
71 {{ macros.edit_buttons() }}
72 </form>
73
74 {{ macros.datalist_of_direct_titles("condition_candidates", condition_candidates) }}
75 {{ macros.datalist_of_indirect_titles("todo_candidates", todo_candidates) }}
76 {% endblock %}