home · contact · privacy
Re-factor date ranging and default to range 'yesterday' to 'tomorrow'.
[plomtask] / templates / calendar.html
1 {% extends '_base.html' %}
2
3
4
5 {% block css %}
6 tr.week_row td {
7   height: 0.1em;
8   background-color: black;
9   padding: 0;
10   margin: 0;
11 }
12 tr.month_row td {
13   border: 0.1em solid black;
14   text-align: center;
15 }
16 td.day_name {
17   padding-right: 0.5em;
18 }
19 {% endblock %}
20
21
22
23 {% block content %}
24 <h3>calendar</h3>
25
26 <form action="calendar" method="GET">
27 from <input name="start" value="{{start}}" />
28 to <input name="end" value="{{end}}" />
29 <input type="submit" value="OK" />
30 </form>
31 <table>
32 {% for day in days %}
33
34 {% if day.first_of_month %}
35 <tr class="month_row">
36 <td colspan=3>{{ day.month_name }}</td>
37 </tr>
38 {% endif %}
39
40 {% if day.weekday == "Monday" %}
41 <tr class="week_row">
42 <td colspan=3></td>
43 </tr>
44 {% endif %}
45
46 <tr>
47 <td class="day_name">{{day.weekday|truncate(2,True,'',0)}}</td>
48 <td><a href="day?date={{day.date}}">{{day.date}}</a></td>
49 <td>{{day.comment|e}}</td>
50 </tr>
51
52 {% for todo in day.calendarized_todos %}
53 <tr>
54 <td>[{% if todo.is_done %}X{% else %} {% endif %}]</td>
55 <td><a href="todo?id={{todo.id_}}">{{todo.title_then|e}}</td>
56 <td>{{todo.comment|e}}</td>
57 </tr>
58 {% endfor %}
59
60 {% endfor %}
61 </table>
62 {% endblock %}