home · contact · privacy
ef2402daec9847013e77e71adec306b5f00d5bc8
[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="{{action|e}}" method="POST">
12 <h3>edit task</h3>
13 <input type="hidden" name="id" value="{{ task.id_ }}" />
14 <table>
15 <tr><th>title</th><td class="input"><input name="title" type="text" value="{{ task.title|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>
16 <tr><th>default effort</th><td class="input"><input type="number" name="default_effort" value="{{ task.default_effort }}" 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></td></tr>
17 <tr><th>tags</th>
18 <td>
19 {% for tag in db.t_tags | sort %}
20 <input type="checkbox" name="tag_{{tag|e}}"{% if tag in task.tags %} checked{% endif %}/> {{ tag }}<br />
21 {% endfor %}
22 add: <input name="joined_tags" type="text" value="" ><br />
23 <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>
24 </td></tr>
25 <tr><th>links</th>
26 <td>
27 {% for other_task_id, other_task in db.tasks.items() | sort(attribute='1.title') %}
28 {% if task.id_ != other_task_id and other_task.visible and other_task_id in task.links %}
29 <input name="link_{{other_task_id}}" type="checkbox" checked /> <a href="{{db.prefix}}/task?id={{ other_task_id }}">{{ other_task.title|e }}</a><br />
30 {% endif %}
31 {% endfor %}
32 {% for other_task_id, other_task in db.tasks.items() | sort(attribute='1.title') %}
33 {% if task.id_ != other_task_id and other_task.visible and not other_task_id in task.links %}
34 <input name="link_{{other_task_id}}" type="checkbox"/> <a href="{{db.prefix}}/task?id={{ other_task_id }}">{{ other_task.title|e }}</a><br />
35 {% endif %}
36 {% endfor %}
37 </td>
38 </tr>
39 </table>
40 <input type="submit" value="update" />
41 </form>
42 <form action="{{action|e}}" method="POST">
43 <input type="hidden" name="id" value="{{ task.id_ }}" />
44 {% include 'tagfilters.html' %}
45 </form>
46 {% include 'watch_form.html' %}
47 {% endblock %}