From f1989fe72df0a7cb4394ebe2ab6fe5d8ff408a38 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 5 Apr 2016 11:26:14 -0300 Subject: Add tabular calendar --- template/calendar_event.j2 | 4 ++-- template/pages/termine/content.html | 2 +- template/tabcalendar.j2 | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 template/tabcalendar.j2 (limited to 'template') diff --git a/template/calendar_event.j2 b/template/calendar_event.j2 index 106b65a..c8418f1 100644 --- a/template/calendar_event.j2 +++ b/template/calendar_event.j2 @@ -1,7 +1,7 @@ {%- if event.recurring %} -

+

{%- else %} -

+

{%- endif -%} {%- if event.multiday %} diff --git a/template/pages/termine/content.html b/template/pages/termine/content.html index ab2c051..d14eb88 100644 --- a/template/pages/termine/content.html +++ b/template/pages/termine/content.html @@ -11,7 +11,7 @@

-$calendar +$tabcalendar
Unser Flur mit Buero, Lager, Hacklab. 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 @@ +
+{%- for month in months %} +

{{ month.date.strftime('%B %Y').decode('utf-8') }}

+ + + + + + + + + + +{%- for week in month.weeks %} + +{%- for i in range(week[0].weekday) %} + +{%- endfor %} +{%- for day in week %} + +{%- endfor %} + +{%- endfor %} +
MontagDienstagMittwochDonnerstagFreitagSamstagSonntag
+{%- for event in day.events %} +{{ event.name }} +{%- if not loop.last %} +
+{%- endif %} +{%- endfor %} +
+{%- endfor %} +
+{% set class = 'expanded' %} +{% include 'calendar.j2' %} -- cgit v1.2.1