home · contact · privacy
Improve accounting scripts.
[misc] / todo_templates / todo.html
1 {% extends 'base.html' %}
2 {% block css %}
3 th, td { vertical-align: top; text-align: left}
4 td.checkbox { width: 0.1em; height: 0.1em; padding: 0em; text-align: center; }
5 input[type="number"] { text-align: right; }
6 {% endblock %}
7 {% block content %}
8 <form action="todo" method="POST">
9 <h3>edit todo</h3>
10 <input type="hidden" name="todo_id" value="{{todo.id_}}" />
11 <input type="hidden" name="return_to" value="{{return_to}}" />
12 <table>
13 <tr><th>task</th><td><a href="{{db.prefix}}/task?id={{ todo.task.id_ }}">{{ todo.task.title.then|e }}</a></td></tr>
14 <tr><th>default effort</th><td>{{ todo.default_effort }}</td></tr>
15 <tr>
16 <th>efforts</th>
17 <td>
18 <table>
19 <tr><th>date</th><th>effort</th><th>delete</th>
20 {% for date, effort in todo.efforts.items() %}
21 <tr>
22 <td><input name="effort_date" size=10 value="{{date}}" {% if todo.children and effort %}disabled{% endif %}></td>
23 <td><input type="number" name="effort" step=0.1 size=8 value="{{effort}}" placeholder="{{todo.default_effort}}" {% if todo.children and effort %}disabled{% endif %} /></td>
24 <td>{% if not (todo.children and effort) %}<input type="checkbox" name="delete_effort" value="{{date}}" />{% endif %}</td>
25 </tr>
26 {% endfor %}
27 <tr>
28 <td><input name="effort_date" size=10 value=""></td>
29 <td><input type="number" name="effort" step=0.1 size=8 value="" {% if todo.children %} disabled {% else %} placeholder="{{todo.default_effort}}" {% endif %} /></td>
30 </tr>
31 </table>
32 </td>
33 </tr>
34 <tr>
35 <th>total effort</th><td>{{todo.all_days_effort}}</td>
36 </tr>
37 <tr><th>importance</th><td class="input"><input type="number" name="importance" step=0.1 size=8 value="{{ todo.importance }}" /></td></tr>
38 <tr><th>comment</th><td class="input"><textarea name="comment" rows=3 cols=100>{{todo.comment|e}}</textarea></td></tr>
39 <tr>
40 <th>done</th>
41 <td class="input">
42 {% if todo.children %}✓{% else %}<input type="checkbox" name="done" {% if todo.done %}checked{% endif %}/>{% endif %}
43 </td>
44 </tr>
45 <tr><th>day tags</th>
46 <td>
47 {% for tag in db.t_tags | sort %}
48 {% if tag in todo.task.tags.now %}&nbsp;✓{% else %}<input type="checkbox" name="day_tag_{{tag|e}}"{% if tag in todo.day_tags %} checked{% endif %}/>{% endif %} {{ tag }}<br />
49 {% endfor %}
50 add: <input name="joined_day_tags" value="" size=100 >
51 </td>
52 </tr>
53 <tr><th>parent</th><td>{% if todo.parent %}<a href="todo?id={{todo.parent.id_}}">{{todo.parent.title}}</a>{% else %}–{% endif %}</td></tr>
54 <tr><th>children</th>
55 <td>
56 <table>
57 {% for todo in child_todos %}
58 <tr>
59         <!-- <td><input name="link_child" type="checkbox" value="{{todo.id_}}" checked disabled/></td> -->
60         <td>{% if todo.done %}✓{% endif %}</td><td>{{todo.all_days_effort}}</td>
61 <td><a href="todo?id={{todo.id_}}">{{todo.title}}</a></td>
62 </tr>
63 {% endfor %}
64 <!--
65 <tr>
66 <th colspan=2>---</th>
67 </tr>
68 {% for todo in filtered_todos %}
69 <tr>
70 <td><input name="link_todo" type="checkbox" value="{{todo.id_}}" disabled/></td>
71 <td><a href="todo?id={{todo.id_}}">{{todo.title}}</a></td>
72 </tr>
73 {% endfor %}
74 -->
75 </table>
76 </td>
77 </table>
78 <input type="submit" value="update" />
79 <div style="text-align: right">
80 <input type="submit" name="delete" value="delete" />
81 </div>
82 </form>
83 {% endblock %}