home · contact · privacy
Improve template layouts.
[plomtask] / templates / todo.html
1 {% extends 'base.html' %}
2
3
4
5 {% block content %}
6 <h3>Todo: {{todo.process.title.newest|e}}</h3>
7 <form action="todo?id={{todo.id_}}" method="POST">
8 <table>
9
10 <tr>
11 <th>day</th>
12 <td><a href="day?date={{todo.date}}">{{todo.date}}</a></td>
13 </tr>
14
15 <tr>
16 <th>process</th>
17 <td><a href="process?id={{todo.process.id_}}">{{todo.process.title.newest|e}}</a></td>
18 </tr>
19
20 <tr>
21 <th>done</th>
22 <td><input type="checkbox" name="done" {% if todo.is_done %}checked {% endif %} {% if not todo.is_doable %}disabled {% endif %}/><br /></td>
23 </tr>
24
25 <tr>
26 <th>comment</th>
27 <td><input name="comment" value="{{todo.comment|e}}"/></td>
28 </tr>
29
30 <tr>
31 <th>conditions</th>
32 <td>
33 <table>
34 {% for condition in todo.conditions %}
35 <tr>
36 <td>
37 <input type="checkbox" name="condition" value="{{condition.id_}}" checked />
38 </td>
39 <td>
40 <a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a>
41 </td>
42 </tr>
43 {% endfor %}
44 </table>
45 add: <input name="condition" list="condition_candidates" autocomplete="off" />
46 </td>
47 </tr>
48
49 <tr>
50 <th>enables</th>
51 <td>
52 <table>
53 {% for condition in todo.enables %}
54 <tr>
55 <td>
56 <input type="checkbox" name="enables" value="{{condition.id_}}" checked />
57 </td>
58 <td>
59 <a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a>
60 </td>
61 </tr>
62 {% endfor %}
63 </table>
64 add: <input name="enables" list="condition_candidates" autocomplete="off" />
65 </td>
66 </tr>
67
68 <tr>
69 <th>disables</th>
70 <td>
71 <table>
72 {% for condition in todo.disables%}
73 <tr>
74 <td>
75 <input type="checkbox" name="disables" value="{{condition.id_}}" checked />
76 </td>
77 <td>
78 <a href="condition?id={{condition.id_}}">{{condition.title.newest|e}}</a>
79 </td>
80 </tr>
81 {% endfor %}
82 </table>
83 add: <input name="disables" list="condition_candidates" autocomplete="off" />
84 </td>
85 </tr>
86
87 <tr>
88 <th>parents</th>
89 <td>
90 {% for parent in todo.parents %}
91 <a href="todo?id={{parent.id_}}">{{parent.process.title.newest|e}}</a><br />
92 {% endfor %}
93 </td>
94 </tr>
95
96 <tr>
97 <th>children</th>
98 <td>
99 <table>
100 {% for child in todo.children %}
101 <tr>
102 <td><input type="checkbox" name="adopt" value="{{child.id_}}" checked /></td>
103 <td><a href="todo?id={{child.id_}}">{{child.process.title.newest|e}}</a></td>
104 </tr>
105 {% endfor %}
106 </table>
107 adopt: <input name="adopt" list="todo_candidates" autocomplete="off" />
108 </td>
109 </tr>
110
111 </table>
112 <input class="btn-harmless" type="submit" name="update" value="update" />
113 <div class="btn-to-right">
114 <input class="btn-dangerous" type="submit" name="delete" value="delete" />
115 </div>
116 </form>
117
118 <datalist id="condition_candidates">
119 {% for condition_candidate in condition_candidates %}
120 <option value="{{condition_candidate.id_}}">{{condition_candidate.title.newest|e}}</option>
121 {% endfor %}
122 </datalist>
123 <datalist id="todo_candidates">
124 {% for candidate in todo_candidates %}
125 <option value="{{candidate.id_}}">{{candidate.process.title.newest|e}} ({{candidate.id_}})</option>
126 {% endfor %}
127 </datalist>
128 {% endblock %}