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