1 {% extends 'base.html' %}
4 td.number, td.checkbox { text-align: center; }
5 td { vertical-align: middle; }
6 td button { padding: 0em; }
7 th.centered { text-align: center; }
10 list-style-type: none;
12 details > summary.has_dependers {
15 details[open] > summary.has_dependers {
18 details > summary.has_deps::after {
21 details[open] > summary.has_deps::after {
29 <form id="form_to_watch" action="do_todos" method="POST">
30 {% include 'tagfilters.html' %}
32 <input name="hide_done" type="checkbox" {% if hide_done %}checked{% endif %} /> hide done
33 <input id="filter_button" type="submit" name="filter" value="filter" />
35 | <a href="do_todos?date={{prev_date}}">prev</a> | {{day.date}} | <a href="do_todos?date={{next_date}}">next</a> |
36 comment: <input name="day_comment" value="{{day.comment|e}}">
37 <input class="update" type="submit" name="update" value="update">
38 <input type="hidden" name="date" value="{{day.date}}" />
42 task quick-add: <input name="choose_task" size=50 list="tasks" autocomplete="off">
43 don't adopt, make new: <input type="checkbox" name="dont_adopt" />
46 {% for task in all_tasks %}
47 <option value="{{task.id_}}">({{task.subtask_depth}}) {{task.title.now}}</option>
51 {% if adoptable_past_todos %}
55 there are adoptable/unfinished past todos ({{adoptable_past_todos|count}})
57 <table class="alternating">
59 <th>adopt?</th><th>date</th><th>title</th><th>comment</th>
61 {% for todo in adoptable_past_todos %}
63 <td class="checkbox"><input name="choose_todo" type="checkbox" value="{{todo.id_}}"></td>
64 <td>{{todo.earliest_date}}</td>
65 <td><a href="todo?id={{todo.id_}}">{{todo.title|e}}</a></td>
66 <td>{{todo.comment|e}}</td>
74 <table class="alternating">
76 <th {% if sort=='done' %}class="desc"{% endif %}>
77 <a href="?sort=done">done</a>
79 <th class="centered{% if sort=='default_effort' %} desc{% endif %}">
80 <a href="?sort=default_effort">effort</a>
82 <th {% if sort=='importance' %}class ="desc"{% endif %}>
83 <a href="?sort=importance">importance</a>
85 <th {% if sort=='title' %}class="desc"{% endif %}>
86 <a href="?sort=title">todo</a>
91 {% for todo in todos %}
93 <input name="todo_id" value="{{todo.id_}}" type="hidden" >
95 <input name="done" type="checkbox" value="{{todo.id_}}" {% if todo.done %}checked{% endif %} {% if todo.deps_done == false %}disabled{% endif %}>
98 <input class="effort_input" name="effort" type="number" step=0.1 size=7 value="{% if todo.day_effort is not none %}{{todo.day_effort}}{% endif %}" placeholder={{"%.1f"|format(todo.task.default_effort.then)}} >
101 <input name="importance" type="number" step=0.1 size=7 value={{todo.importance}} } >
104 {% if todo.dependers|length > 0 or todo.deps|length > 0 %}
106 <summary class="{% if todo.dependers|length > 0 %}has_dependers{% endif %} {% if todo.deps|length > 0 %}has_deps{% endif %}">
108 <a href="todo?id={{todo.id_}}&return_to=do_todos">{{todo.title|e}}</a>
109 {% if todo.dependers|length > 0 or todo.deps|length > 0 %}
111 {% if todo.dependers|length > 0 %}
114 {% for path in todo.depender_paths %}
115 <li>{% for depender_todo in path %}<a href="todo?id={{depender_todo.id_}}&return_to=do_todos">{{ depender_todo.title|e }}</a> ▶ {% endfor %}…
119 {% if todo.deps|length > 0 %}
122 {% for dep_todo in todo.deps %}
123 <li>[{% if dep_todo.done %}✓{% else %} {% endif %}] <a href="todo?id={{dep_todo.id_}}&return_to=do_todos">{{ dep_todo.title|e }}</a>{% if dep_todo.deps|length > 0 %} ▶{% endif %}
131 <input name="effort_comment" type="text" size=100 value="{{todo.comment|e}}" />
137 <input id="update_button" class="update" type="submit" name="update" value="update">
140 {% include 'watch_form.html' %}
142 mere_filter_inputs = mere_filter_inputs.concat(['hide_done']);
143 var effort_inputs = document.getElementsByClassName("effort_input");
144 for (let i = 0; i < effort_inputs.length; i++) {
145 let input = effort_inputs[i];
146 let button = document.createElement('button');
147 button.innerHTML = '+' + parseFloat(input.placeholder).toFixed(1);
148 button.onclick = function(event) {
149 event.preventDefault();
151 input.value = parseFloat(input.value) + parseFloat(input.placeholder);
153 input.value = parseFloat(input.placeholder);
155 input.value = parseFloat(input.value).toFixed(1);
156 changes_to_commit = true;
158 input.insertAdjacentElement('afterend', button);