home · contact · privacy
Various small fixes.
[misc] / todo_templates / task.html
index b0ed3e8b115f9f195ef1eb1fb5fff7e3e8c7f553..85347efece93587e0f595050af3880ad9ec6e956 100644 (file)
@@ -8,12 +8,14 @@ input[type="text"] { width: 100% }
 textarea { width: 100% };
 {% endblock %}
 {% block content %}
-<form id="form_to_watch" action="{{action|e}}" method="POST">
+<form id="form_to_watch" action="task" method="POST">
 <h3>edit task</h3>
 <input type="hidden" name="id" value="{{ task.id_ }}" />
-<input type="hidden" name="referer" value="{{ referer }}" />
+<input type="hidden" name="return_to" value="{{ return_to }}" />
 <table>
 <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>
+<tr><th></th><td><input type="checkbox" name="as_todo" {% if selected %}checked{% endif%}> selected for {{db.selected_date}}</td></tr>
+<tr><th>comment</th><td class="input"><textarea name="comment">{{task.comment|e}}</textarea></td></tr>
 <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>
 <tr><th>tags</th>
 <td>
@@ -23,26 +25,36 @@ textarea { width: 100% };
 add: <input name="joined_tags" type="text" value="" ><br />
 <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>
 </td></tr>
-<tr><th>links</th>
+<tr><th>children</th>
 <td>
-{% for other_task_id, other_task in db.tasks.items() | sort(attribute='1.title') %}
-{% if task.id_ != other_task_id and other_task.visible and other_task_id in task.links %}
-<input name="link_{{other_task_id}}" type="checkbox" checked /> <a href="{{db.prefix}}/task?id={{ other_task_id }}">{{ other_task.title|e }}</a><br />
-{% endif %}
+<table>
+{% for subtask in linked_tasks %}
+<tr>
+<td><input name="link_task" type="checkbox" value="{{subtask.id_}}" checked/></td>
+<td><a href="task?id={{subtask.id_}}">{{subtask.title}}</a></td>
+</tr>
 {% endfor %}
-{% for other_task_id, other_task in db.tasks.items() | sort(attribute='1.title') %}
-{% if task.id_ != other_task_id and other_task.visible and not other_task_id in task.links %}
-<input name="link_{{other_task_id}}" type="checkbox"/> <a href="{{db.prefix}}/task?id={{ other_task_id }}">{{ other_task.title|e }}</a><br />
-{% endif %}
+<tr>
+<th colspan=2>---</th>
+</tr>
+{% for subtask in filtered_tasks %}
+<tr>
+<td><input name="link_task" type="checkbox" value="{{subtask.id_}}"/></td>
+<td><a href="task?id={{subtask.id_}}">{{subtask.title}}</a></td>
+</tr>
 {% endfor %}
+</table>
 </td>
 </tr>
 </table>
 <input type="submit" value="update" />
 </form>
-<form action="{{action|e}}" method="POST">
-<input type="hidden" name="id" value="{{ task.id_ }}" />
+<form action="task" method="POST">
+<input type="hidden" name="id" value="{{task.id_}}" />
 {% include 'tagfilters.html' %}
+<br />
+search: <input name="search" value="{{search|e}}" />
+<input type="submit" name="filter" value="filter" />
 </form>
 {% include 'watch_form.html' %}
 {% endblock %}