home · contact · privacy
88fa72b2e0ec6fc9afb0abd7b8f89b2ab7b45e70
[misc] / todo_templates / todo.html
1 {% extends 'base.html' %}
2
3 {% block css %}
4 tr.toplevel th { padding-right: 1em; }
5 td.center { text-align: center; }
6 tr.toplevel td, tr.toplevel th { padding-top: 1em; }
7 tr.lowlevel td, tr.lowlevel th { padding-top: 0em; }
8 {% endblock %}
9
10 {% block content %}
11 <h3>edit todo</h3>
12
13 <form action="todo" method="POST">
14 <input type="hidden" name="todo_id" value="{{todo.id_}}" />
15 <input type="hidden" name="importance" step=0.1 size=8 value="{{ todo.importance }}" />
16 <table>
17
18 <tr class="toplevel">
19 <th>task</th>
20 <td colspan=2>
21 <a href="task?id={{ todo.task.id_ }}">{{ todo.task.title.then|e }}</a>
22 {% if todo.task.comment %}
23 <pre>{{ todo.task.comment|e }}</pre>
24 {% else %}
25 <br />&nbsp;
26 {% endif %}
27 </td>
28 </tr>
29
30 <tr class="toplevel">
31 <th>work</th>
32 <td>
33 <input type="checkbox" name="done" {% if todo.done %}checked{% endif %} {% if todo.deps_done == false %}disabled{% endif %}/>
34 done<br />
35 (all days: {{todo.all_days_effort}})<br />
36 (dependencies: {{todo.all_days_effort}})
37 </td>
38 <td>
39 <table>
40 <tr class="lowlevel">
41 <th>date</th>
42 <th>effort</th>
43 <th>delete</th>
44 </tr>
45 {% for date, effort in todo.efforts.items() %}
46 <tr class="lowlevel">
47 <td>
48 <input name="effort_date" type="hidden" value="{{date}}">{{date}}
49 </td>
50 <td>
51 <input type="number" name="effort" step=0.1 size=8 value="{{effort}}" placeholder="{{todo.default_effort}}" {% if todo.deps and effort %}disabled{% endif %} />
52 </td>
53 <td>
54 {% if not (todo.deps and effort) %}<input type="checkbox" name="delete_effort" value="{{date}}" />{% endif %}
55 </td>
56 </tr>
57 {% endfor %}
58 <tr class="lowlevel">
59 <td>
60 <input name="effort_date" size=10 value="">
61 </td>
62 <td>
63 <input type="number" name="effort" step=0.1 size=8 value="" {% if todo.deps %} disabled {% else %} placeholder="{{todo.default_effort}}" {% endif %} />
64 </td>
65 </tr>
66 </table>
67 </td>
68 </tr>
69
70 <tr class="toplevel">
71 <th>comment</th>
72 <td class="input" colspan=2>
73 <input name="comment" size=100 value="{{todo.comment|e}}" />
74 </td>
75 </tr>
76
77 <tr class="toplevel">
78 <th>tags</th>
79 <td colspan=2>
80 new: <input name="tag" value="" size=15 >
81 {% for tag in todo.task.tags.now | sort %}<select disabled><option>{{ tag }}</option></select>{% endfor %}
82 {{ macros.tagselection(submit_name='tag', selected_tags=todo.day_tags, all_tags=tags) }}
83 <br />
84 </td>
85 </tr>
86
87 {% if todo.dependers %}
88 <tr class="toplevel">
89 <th>dependers</th>
90 <td colspan=2>
91 <ul>
92 {% for depender in todo.dependers %}
93 <li><a href="todo?id={{depender.id_}}">{{depender.title}}</a>
94 {% endfor %}
95 </ul>
96 </td>
97 </tr>
98 {% endif %}
99
100 <tr class="toplevel">
101 <th>dependencies</th>
102 <td colspan=2>
103 {% if todo.deps %}
104 <table>
105 <tr class="lowlevel">
106 <th>adopted</th><th>effort</th><th>title</th><th>comments</th>
107 </tr>
108 {% for todo in dep_todos %}
109 <tr class="lowlevel">
110 <td class="center"><input name="adopt_dep" type="checkbox" value="{{todo.id_}}" checked/></td>
111 <td class="number">{{ '{:2.1f}'.format(todo.all_days_effort) }} {% if todo.done %}✓{% else %}&nbsp;{% endif %}</td>
112 <td><a href="todo?id={{todo.id_}}">{{todo.day.date}} {{todo.title}}</a></td>
113 <td>{{todo.comment}}</td>
114 </tr>
115 {% endfor %}
116 </table>
117 {% endif %}
118 <br />
119 make from task:<br />
120 <input name="birth_dep" list="tasks" size=100><br />
121 adopt (from <input name="start" {% if start_date %}value="{{ start_date }}"{% endif %} placeholder="yesterday" /> to <input name="end" {% if end_date %}value="{{ end_date }}"{% endif %} placeholder="2030-12-31" />):<br />
122 <input name="adopt_dep" list="todos" size=100>
123 <datalist id="todos">
124 {% for todo in filtered_todos %}<option value="{{todo.id_}}">{{ '{:2.1f}'.format(todo.all_days_effort) }} {% if todo.done %}✓{% else %}&nbsp;&nbsp;{% endif %} {{todo.day.date}} {{todo.title}} {{todo.comment}}</option>
125 {% endfor %}
126 </datalist>
127 <datalist id="tasks">
128 {% for task in filtered_tasks %}<option value="{{task.id_}}">{{task.title.now}}</option>
129 {% endfor %}
130 </datalist>
131 </td>
132 </tr>
133
134 </table>
135 <input id="update_button" class="update" name="update" type="submit" value="update" />
136 <div class="delete">
137 <input class="delete" type="submit" name="delete" value="delete" />
138 </div>
139 </form>
140 {% endblock %}