home · contact · privacy
Add foreign key restraints, expand and fix tests, add deletion and forking.
[misc] / todo_templates / calendar.html
1 {% extends 'base.html' %}
2
3
4
5 {% block css %}
6 #filter { margin-bottom: 1em; }
7 tr.month_row td { color: white; background-color: #555555; text-align: center; }
8 tr.week_row td { height: 0.1em; background-color: black; }
9 tr.day_row td { background-color: #cccccc; }
10 span.selected_date { font-weight: bold; }
11 span.todos_sum { white-space: pre; }
12 {% endblock %}
13
14
15
16 {% block content %}
17 <h3>calendar</h3>
18 <form action="calendar" method="POST">
19
20 <div id="filter">
21 from: <input name="start" {% if start_date %}value="{{ start_date }}"{% endif %} placeholder="yesterday" />
22 to: <input name="end" {% if end_date %}value="{{ end_date }}"{% endif %} placeholder="2030-12-31" />
23 <input type="submit" value="OK" />
24 </div>
25
26 <table>
27 {% for date, day in days.items() %}
28
29 {% if day.month_title %}
30 <tr class="month_row">
31 <td colspan=3>{{ day.month_title }}</td>
32 </tr>
33 {% endif %}
34
35 {% if day.weekday == 'Mo' %}
36 <tr class="week_row">
37 <td colspan=3></td>
38 </tr>
39 {% endif %}
40
41 <tr class="day_row">
42 <td colspan=3>
43 <span {% if date == selected_date %}class="selected_date"{% endif %}>
44 <a href="day_todos?date={{date}}">{{ day.weekday }} {{ date }}</a>
45 </span>
46 <span class="todos_sum">|{{ '{:5.1f}'.format(day.todos_sum)}}|</span>
47 {{ day.comment|e }}
48 </td>
49 </tr>
50
51 {% for todo in day.linked_todos_as_list %}
52 {% if todo.visible %}
53 <tr>
54 <td>
55 {% if "cancelled" in todo.tags %}<s>{% endif %}
56 {{ macros.doneness_string(todo, true) }}
57 <a href="todo?id={{todo.id_}}">
58 {% if "deadline" in todo.tags %}DEADLINE: {% endif %}
59 {{ todo.title|e }}
60 </a>
61 {%if "cancelled" in todo.tags%}</s>{% endif %}
62 </td>
63 <td>
64 {{ todo.comment|e }}
65 </td>
66 </tr>
67 {% endif %}
68 {% endfor %}
69
70 {% endfor %}
71 </table>
72
73 <p>
74 <a href="calendar_export?{% if start_date %}start={{start_date}}&{% endif %}{% if end_date %}end={{end_date}}{% endif %}">exportable</a>
75 </p>
76
77 </form>
78 {% endblock %}
79