summaryrefslogtreecommitdiff
path: root/template/tabcalendar.j2
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2016-04-05 11:26:14 -0300
committerChristian Franke <nobody@nowhere.ws>2016-04-05 11:26:14 -0300
commitf1989fe72df0a7cb4394ebe2ab6fe5d8ff408a38 (patch)
treefb3c6eddd44549fc2a1d368ea6b33cd71ffbfbca /template/tabcalendar.j2
parentc5cc5086d00786cfb8696655ffbd95922dc5d68c (diff)
Add tabular calendar
Diffstat (limited to 'template/tabcalendar.j2')
-rw-r--r--template/tabcalendar.j235
1 files changed, 35 insertions, 0 deletions
diff --git a/template/tabcalendar.j2 b/template/tabcalendar.j2
new file mode 100644
index 0000000..9546e06
--- /dev/null
+++ b/template/tabcalendar.j2
@@ -0,0 +1,35 @@
+<div class="calendar-table">
+{%- for month in months %}
+<p>{{ month.date.strftime('%B %Y').decode('utf-8') }}</p>
+<table>
+<tr>
+ <th>Montag</th>
+ <th>Dienstag</th>
+ <th>Mittwoch</th>
+ <th>Donnerstag</th>
+ <th>Freitag</th>
+ <th>Samstag</th>
+ <th>Sonntag</th>
+</tr>
+{%- for week in month.weeks %}
+<tr>
+{%- for i in range(week[0].weekday) %}
+<td></td>
+{%- endfor %}
+{%- for day in week %}
+<td>
+{%- for event in day.events %}
+<a href="#event-{{ event.id }}">{{ event.name }}</a>
+{%- if not loop.last %}
+<br/>
+{%- endif %}
+{%- endfor %}
+</td>
+{%- endfor %}
+</tr>
+{%- endfor %}
+</table>
+{%- endfor %}
+</div>
+{% set class = 'expanded' %}
+{% include 'calendar.j2' %}