Update terminkalender
This commit is contained in:
parent
e45b6a8e73
commit
43cd597f99
1 changed files with 50 additions and 51 deletions
|
@ -1,21 +1,22 @@
|
|||
{#- HTML Calender Renderer for Startpage -#}
|
||||
{{- '\n ' -}}
|
||||
<!-- Flow Calendar -->
|
||||
<table class="template">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Datum</th>
|
||||
<th>Veranstaltung</th>
|
||||
<th>Ort</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{- '\n ' -}} <!-- Flow Calendar -->
|
||||
{%- set pages = site.query('/').include_undiscoverable(true).all() -%}
|
||||
{%- set counter = ['1'] -%}
|
||||
{%- for page in pages -%}
|
||||
{%- if page._path == this.calendar_name -%}
|
||||
{%- for blk in page.dates.blocks|sort(attribute='start', reverse = False) -%}
|
||||
{%- if blk.start.strftime('%Y%m%d%H%M') > none|datetimeformat('yyyyMMddhhmm') -%}
|
||||
{%- if loop.index == 1 -%}
|
||||
{{- '\n ' -}} <table class="template">
|
||||
{{- '\n ' -}} <thead>
|
||||
{{- '\n ' -}} <tr>
|
||||
{{- '\n ' -}} <th>Datum</th>
|
||||
{{- '\n ' -}} <th>Veranstaltung</th>
|
||||
{{- '\n ' -}} <th>Ort</th>
|
||||
{{- '\n ' -}} </tr>
|
||||
{{- '\n ' -}} </thead>
|
||||
{{- '\n ' -}} <tbody>
|
||||
{%- endif -%}
|
||||
{%- if counter.append('1') -%}
|
||||
{#- Counter zum zaehlen ob es mehr wie 1 Temrin gibt -#}
|
||||
{%- endif -%}
|
||||
|
@ -39,14 +40,12 @@
|
|||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- if counter|length < 2 %}
|
||||
{{- '\n ' -}} <tr>
|
||||
{{- '\n ' -}} <th>Leider derzeit</th>
|
||||
{{- '\n ' -}} <th>noch keine neuen Termine</th>
|
||||
{{- '\n ' -}} <th>geplant!</th>
|
||||
{{- '\n ' -}} </tr>
|
||||
{%- if counter|length < 2 and loop.index == 1 %}
|
||||
{{- '\n ' -}} <p><i>Leider derzeit noch keine neuen Termine geplant!</i></p>
|
||||
{%- endif -%}
|
||||
{%- endfor %}
|
||||
{%- if counter|length > 1 -%}
|
||||
{{- '\n ' -}} </tbody>
|
||||
{{- '\n ' -}}</table>
|
||||
{{- '\n ' -}}<br/>
|
||||
{%- endif -%}
|
||||
|
|
Loading…
Reference in a new issue