home · contact · privacy
Some work on tests, kinda unfinished.
[plomtask] / templates / calendar.html
1 {% extends '_base.html' %}
2
3
4
5 {% block css %}
6 tr.week_row td {
7   height: 0.3em;
8   background-color: black;
9   padding: 0;
10   margin: 0;
11   border-top: 0.2em solid white;
12 }
13 tr.month_row td {
14   border-top: 0.2em solid white;
15   color: white;
16   background-color: #555555;
17 }
18 table {
19   width: 100%;
20 }
21 tr.day_row td {
22   background-color: #cccccc;
23   border-top: 0.2em solid white;
24 }
25 td.day_name {
26   padding-right: 0.5em;
27 }
28 td.today {
29   font-weight: bold;
30 }
31 span.total_effort {
32   white-space: pre;
33 }
34 {% endblock %}
35
36
37
38 {% block content %}
39 <h3>calendar</h3>
40
41 <p><a href="/calendar_txt">basic view</a></p>
42
43 <form action="calendar" method="GET">
44 from <input name="start" class="date" value="{{start}}" />
45 to <input name="end" class="date" value="{{end}}" />
46 <input type="submit" value="OK" />
47 </form>
48 <table>
49 {% for day in days %}
50
51 {% if day.first_of_month %}
52 <tr class="month_row">
53 <td colspan=2>{{ day.month_name }}</td>
54 </tr>
55 {% endif %}
56
57 {% if day.weekday == "Monday" %}
58 <tr class="week_row">
59 <td colspan=2></td>
60 </tr>
61 {% endif %}
62
63 <tr class="day_row">
64 <td class="day_name {% if day.date == today %}today{% endif %}">
65 <a href="day?date={{day.date}}">{{day.weekday|truncate(2,True,'',0)}} {% if day.date == today %} {% endif %}{{day.date}}</a>
66 [<span class="total_effort">{{ '{:5.1f}'.format(day.total_effort) }}</span>]
67 {{day.comment|e}}</td>
68 </tr>
69
70 {% for todo in day.calendarized_todos %}
71 <tr>
72 <td>[{% if todo.is_done %}X{% else %} {% endif %}] <a href="todo?id={{todo.id_}}">{{todo.title_then|e}}</a>{% if todo.comment %} · {{todo.comment|e}}{% endif %}</td>
73 </tr>
74 {% endfor %}
75
76 {% endfor %}
77 </table>
78 {% endblock %}