home · contact · privacy
Improve accounting scripts.
[misc] / todo_templates / day.html
diff --git a/todo_templates/day.html b/todo_templates/day.html
deleted file mode 100644 (file)
index 05b5fd7..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-{% extends 'base.html' %}
-{% block css %}
-table.alternating tr:nth-child(even) {
-    background-color: #cccccc;
-}
-table.alternating tr:nth-child(odd) {
-    background-color: #ffffff;
-}
-th.desc { background: linear-gradient(to bottom, white, grey); }
-td.checkbox, td.number { height: 0.1em; padding: 0em; text-align: center; }
-td.checkbox { width: 0.1em }
-td button { height: 1.5em; padding: 0em; margin: 0em }
-td details { display: inline }
-input[type="number"] { text-align: right; }
-{% endblock %}
-{% block content %}
-<form action="{{action|e}}" method="POST">
-{% include 'tagfilters.html' %}
-<p>
-<input name="expect_unchosen_done" type="hidden" value="1"/>
-<input name="hide_unchosen" type="checkbox" {% if db.hide_unchosen %}checked{% endif %} /> hide unchosen <input name="hide_done" type="checkbox" {% if db.hide_done %}checked{% endif %} /> hide done
-</p>
-</form>
-
-<h3>edit day</h3>
-<form id="form_to_watch" action="{{action|e}}" method="POST">
-<p>
-| <a href="{{db.prefix}}/day?selected_date={{prev_date}}">prev</a> | {{db.selected_date}} | <a href="{{db.prefix}}/day?selected_date={{next_date}}">next</a> | 
-comment: <input name="day_comment" value="{{ db.selected_day.comment|e }}">
-<input type="submit" value="update">
-<input type="hidden" name="selected_date" value="{{ db.selected_date }}" />
-</p>
-<details>
-<summary>done: {{ db.selected_day.todos_sum|round(2) }} ({{ db.selected_day.todos_sum2|round(2)}})</summary>
-<table class="alternating">
-{% for todo in done_tasks %}
-<tr>
-<td>{{todo.task.current_title|e}}</td>
-<td>{{todo.effort}}</td>
-<td>{{todo.comment}}</td>
-</tr>
-{% endfor %}
-</table>
-</details>
-<table class="alternating">
-<tr>
-<th {% if sort=='title' %}class="desc"{% endif %}><a href="?sort=title">task</a></th>
-<th {% if sort=='chosen' %}class="desc"{% endif %}><a href="?sort=chosen">todo</a></th>
-<th {% if sort=='done' %}class="desc"{% endif %}><a href="?sort=done">done</a></th>
-<th {% if sort=='default_effort' %}class="desc"{% endif %}><a href="?sort=default_effort">effort</a></th>
-<th {% if sort=='importance' %}class="desc"{% endif %}><a href="?sort=importance">importance</a></th>
-<th>edit?</th><th>day tags</th>
-<th {% if sort=='comment' %}class="desc"{% endif %}><a href="?sort=comment">comment</a></th></tr>
-{% for row in task_rows %}
-<tr>
-<input name="t_uuid" value="{{ row.uuid }}" type="hidden" >
-<td><details><summary>] <a href="{{db.prefix}}/task?id={{ row.uuid }}&referer=day" />{{ row.task.current_title|e }}</a></summary>tags: {% for tag in row.task.tags | sort %}<a href="{{db.prefix}}/day?t_and={{tag|e}}">{{ tag }}</a> {% endfor %}</details></td>
-{% if row.todo %}
-<td class="checkbox"><input name="choose" type="checkbox" value="{{ row.uuid }}" checked></td>
-<td class="checkbox"><input name="done" type="checkbox" value="{{ row.uuid }}" {% if row.todo.done %}checked{% endif %}></td>
-<td class="number"><input class="day_effort_input" name="day_effort" type="number" step=0.1 size=8 value="{% if row.todo.day_effort is not none %}{{ row.todo.day_effort }}{% endif %}" placeholder={{ row.task.current_default_effort }} ></td>
-<td class="number"><input name="importance" type="number" step=0.1 size=8 value="{{row.todo.importance}}" ></td>
-<td><a href="{{db.prefix}}/todo?task={{row.uuid}}&date={{db.selected_date}}&referer=day">edit</a></td>
-<td>{% for tag in row.todo.day_tags | sort %}<a href="{{db.prefix}}/tags?t_and={{tag|e}}">{{ tag }}</a> {% endfor %}</td>
-<td>{{ row.todo.comment|e }}</td>
-{% else %}
-<td class="checkbox"><input name="choose" type="checkbox" value="{{ row.uuid }}"</td>
-<td class="checkbox"><input name="done" type="checkbox" value="{{ row.uuid }}"></td>
-<td class="number"><input class="day_effort_input" name="day_effort" type="number" step=0.1 size=8 placeholder={{ row.task.current_default_effort }} ></td>
-<td class="number"><input name="importance" type="number" step=0.1 size=8 value="1.0" ></td>
-<td><a href="{{db.prefix}}/todo?task={{row.uuid}}&date={{db.selected_date}}&referer=day">edit</a></td>
-<td></td>
-<td></td>
-<td></td>
-{% endif %}
-</tr>
-{% endfor %}
-</table>
-<input type="submit" value="update">
-</form>
-{% include 'watch_form.html' %}
-<script>
-var day_effort_inputs = document.getElementsByClassName("day_effort_input");
-for (let i = 0; i < day_effort_inputs.length; i++) {
-    let input = day_effort_inputs[i];
-    let button = document.createElement('button');
-    button.innerHTML = '+' + input.placeholder;
-    button.onclick = function(event) {
-        event.preventDefault();
-        if (input.value) {
-            input.value = parseFloat(input.value) + parseFloat(input.placeholder);
-        } else {
-            input.value = parseFloat(input.placeholder);
-        }
-        input.value = parseFloat(input.value).toFixed(1);
-        formHasChanged = true; 
-    };
-    input.insertAdjacentElement('afterend', button);
-}
-</script>
-{% endblock %}