home · contact · privacy
Simplify and improve previous bugfix.
[plomtask] / templates / todo.html
1 {% extends '_base.html' %}
2 {% import '_macros.html' as macros %}
3
4
5
6 {% block content %}
7 <h3>Todo: {{todo.title_then|e}}</h3>
8 <form action="todo?id={{todo.id_}}" method="POST">
9
10 <table class="edit_table">
11 <tr>
12 <th>day</th>
13 <td><a href="day?date={{todo.date}}">{{todo.date}}</a></td>
14 </tr>
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 <tr>
20 <th>done</th>
21 <td><input type="checkbox" name="done" {% if todo.is_done %}checked {% endif %} {% if not todo.is_doable %}disabled {% endif %}/>
22 {% if not todo.is_doable and todo.is_done %}<input type="hidden" name="done" value="1" />{% endif %}
23 </td>
24 </tr>
25 <tr>
26 <th>effort</th>
27 <td><input type="number" name="effort" step=0.1 size=5 placeholder={{todo.effort_then}} value={{todo.effort}} /></td>
28 </tr>
29 <tr>
30 <th>comment</th>
31 <td><input name="comment" type="text" value="{{todo.comment|e}}"/></td>
32 </tr>
33 <tr>
34 <th>calendarize</th>
35 <td><input type="checkbox" name="calendarize" {% if todo.calendarize %}checked {% endif %}</td>
36 </tr>
37 <tr>
38 <th>conditions</th>
39 <td>{{ macros.simple_checkbox_table("condition", todo.conditions, "condition", "condition_candidates") }}</td>
40 </tr>
41 <tr>
42 <th>blockers</th>
43 <td>{{ macros.simple_checkbox_table("blocker", todo.blockers, "condition", "condition_candidates") }}</td>
44 </tr>
45 <tr>
46 <th>enables</th>
47 <td>{{ macros.simple_checkbox_table("enables", todo.enables, "condition", "condition_candidates") }}</td>
48 </tr>
49 <tr>
50 <th>disables</th>
51 <td>{{ macros.simple_checkbox_table("disables", todo.disables, "condition", "condition_candidates") }}</td>
52 </tr>
53 <tr>
54 <th>parents</th>
55 <td>
56 {% for parent in todo.parents %}
57 <a href="todo?id={{parent.id_}}">{{parent.title_then|e}}</a><br />
58 {% endfor %}
59 </td>
60 </tr>
61 <tr>
62 <th>children</th>
63 <td>{{ macros.simple_checkbox_table("adopt", todo.children, "todo", "todo_candidates", "adopt", true) }}<br />
64 make: <input type="text" name="make" list="process_candidates" autocomplete="off" /></td>
65 </tr>
66 </table>
67
68 {{ macros.edit_buttons() }}
69 </form>
70 {{ macros.datalist_of_titles("condition_candidates", condition_candidates) }}
71 {{ macros.datalist_of_titles("process_candidates", process_candidates) }}
72 <datalist id="todo_candidates">
73 {% for candidate in todo_candidates %}
74 <option value="{{candidate.id_}}">{{candidate.title.newest|e}} {{candidate.comment|e}}</option>
75 {% endfor %}
76 </datalist>
77 {% endblock %}