home · contact · privacy
11f45377caab0d42ebe1bac09ff7cb7e7f3defb4
[misc] / todo_templates / task.html
1 {% extends 'base.html' %}
2 {% block css %}
3 th, td { vertical-align: top; text-align: left}
4 td.input { width: 100%; }
5 td.checkbox { width: 0.1em; height: 0.1em; padding: 0em; text-align: center; }
6 input[type="number"] { text-align: right; }
7 input[type="text"] { width: 100% }
8 textarea { width: 100% };
9 {% endblock %}
10 {% block content %}
11 <form id="form_to_watch" action="task" method="POST">
12 <h3>edit task</h3>
13 <input type="hidden" name="id" value="{{ task.id_ }}" />
14 <input type="hidden" name="return_to" value="{{ return_to }}" />
15 <table>
16 <tr><th>title</th><td class="input"><input name="title" type="text" value="{{ task.title.now|e }}" /><details><summary>history</summary><ul>{% for k,v in task.title.history.items() | sort(attribute='0', reverse=True) %}<li>{{ k }}: {{ v|e }}{% endfor %}</ul></details></td></tr>
17 <tr><th></th><td><input type="checkbox" name="as_todo" {% if selected %}checked{% endif%}> selected for {{db.selected_date}}</td></tr>
18 <tr><th>comment</th><td class="input"><textarea name="comment">{{task.comment|e}}</textarea></td></tr>
19 <tr>
20 <th>default effort</th>
21 <td class="input">
22 {% if task.subtasks %}
23 {{ task.default_effort.now }}
24 {% else %}
25 <input type="number" name="default_effort" value="{{ task.default_effort.now }}" step=0.1 size=8 required /><details><summary>history</summary><ul>{% for k,v in task.default_effort.history.items() | sort(attribute='0', reverse=True) %}<li>{{ k }}: {{ v|e }}{% endfor %}</ul></details>
26 {% endif %}
27 </td>
28 </tr>
29 <tr><th>tags</th>
30 <td>
31 {% for tag in db.t_tags | sort %}
32 <input type="checkbox" name="tag_{{tag|e}}"{% if tag in task.tags.now %} checked{% endif %}/> {{ tag }}<br />
33 {% endfor %}
34 add: <input name="joined_tags" type="text" value="" ><br />
35 <details><summary>history</summary><ul>{% for k,v in task.tags.history.items() | sort(attribute='0', reverse=True) %}<li>{{ k }}: {{ v|e }}{% endfor %}</ul></details>
36 </td></tr>
37 <tr><th>children</th>
38 <td>
39 <table>
40 {% for subtask in task.subtasks %}
41 <tr>
42 <td><input name="subtask" type="checkbox" value="{{subtask.id_}}" checked/></td>
43 <td><a href="task?id={{subtask.id_}}">{{subtask.title.now}}</a></td>
44 </tr>
45 {% endfor %}
46 <tr>
47 <th colspan=2>---</th>
48 </tr>
49 {% for subtask in filtered_tasks %}
50 <tr>
51 <td><input name="subtask" type="checkbox" value="{{subtask.id_}}"/></td>
52 <td><a href="task?id={{subtask.id_}}">{{subtask.title.now}}</a></td>
53 </tr>
54 {% endfor %}
55 </table>
56 </td>
57 </tr>
58 </table>
59 <input type="submit" value="update" />
60 </form>
61 <form action="task" method="POST">
62 <input type="hidden" name="id" value="{{task.id_}}" />
63 {% include 'tagfilters.html' %}
64 <br />
65 search: <input name="search" value="{{search|e}}" />
66 <input type="submit" name="filter" value="filter" />
67 </form>
68 {% include 'watch_form.html' %}
69 {% endblock %}