summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/calendar_event.j24
-rw-r--r--template/pages/termine/content.html2
-rw-r--r--template/tabcalendar.j235
3 files changed, 38 insertions, 3 deletions
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 %}
-<p class="recurring">
+<p class="recurring" {% if 'id' in event %}id="event-{{event.id}}"{% endif %}>
{%- else %}
-<p class="onetime">
+<p class="onetime" {% if 'id' in event %}id="event-{{event.id}}"{% endif %}>
{%- endif -%}
<span class="date">
{%- 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 @@
</div>
<div class="row">
<div class="col-md-8">
-$calendar
+$tabcalendar
</div>
<div class="col-md-4">
<a href="img/hallway.jpg"><img class="img-responsive" src="img/hallway_klein.jpg" alt="Unser Flur mit Buero, Lager, Hacklab."></a>
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' %}