home · contact · privacy
Improve visual/textual calendar structuring.
[plomtask] / templates / calendar.html
index 3acdbc6fc2205e67e0c4e514130e4e33ad292e66..715131af6de410b266fa71c0f29743cebeb74f19 100644 (file)
@@ -1,14 +1,39 @@
 {% extends 'base.html' %}
 
+{% block css %}
+tr.week_row td { height: 0.1em; background-color: black; padding: 0; margin: 0; }
+tr.month_row td { border: 0.1em solid black; text-align: center; }
+{% endblock %}
+
+
+
 {% block content %}
 <form action="calendar" method="GET">
 from <input name="start" value="{{start}}" />
 to <input name="end" value="{{end}}" />
 <input type="submit" value="OK" />
 </form>
-<ul>
+<table>
 {% for day in days %}
-<li><a href="day?date={{day.date}}">{{day.date}}</a> ({{day.weekday}}) {{day.comment|e}}
+
+{% if day.first_of_month %}
+<tr class="month_row">
+<td colspan=3>{{ day.month_name }}</td>
+</tr>
+{% endif %}
+
+{% if day.weekday == "Monday" %}
+<tr class="week_row">
+<td colspan=3></td>
+</tr>
+{% endif %}
+
+<tr>
+<td>{{day.weekday|truncate(2,True,'',0)}}</td>
+<td><a href="day?date={{day.date}}">{{day.date}}</a></td>
+<td>{{day.comment|e}}</td>
+</tr>
+
 {% endfor %}
-</ul>
+</table>
 {% endblock %}