home · contact · privacy
Improve accounting scripts.
[misc] / todo_templates / day.html
index 7dd8f66fa99c28e55f8a892cc1a05543e8e02305..4f5f1fcec74db21ce5aab21cf9912e65dfa88c70 100644 (file)
@@ -6,6 +6,7 @@ table.alternating tr:nth-child(even) {
 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 }
@@ -31,17 +32,24 @@ comment: <input name="day_comment" value="{{ db.selected_day.comment|e }}">
 <input type="hidden" name="selected_date" value="{{ db.selected_date }}" />
 </p>
 <table class="alternating">
-<tr><th><a href="?sort=title">task</a></th><th><a href="?sort=chosen">choose?</a></th><th><a href="?sort=done">done?</a></th><th><a href="?sort=default_effort">effort</a></th><th><a href="?sort=importance">importance</a></th><th>edit?</th><th>day tags</th><th><a href="?sort=comment">comment</a></th></tr>
+<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 }}" />{{ 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>
+<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}}">edit</a></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 %}
@@ -49,7 +57,7 @@ comment: <input name="day_comment" value="{{ db.selected_day.comment|e }}">
 <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}}">edit</a></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>