diff --git a/content/waffeln.ics/contents.lr b/content/waffeln.ics/contents.lr new file mode 100644 index 0000000..adc708b --- /dev/null +++ b/content/waffeln.ics/contents.lr @@ -0,0 +1,5 @@ +_template: waffeln.ics +--- +_model: waffeln +--- +title: C3WOC Tourdaten diff --git a/databags/termine.ini b/databags/termine.ini index 17899c1..0f25cfd 100644 --- a/databags/termine.ini +++ b/databags/termine.ini @@ -1,18 +1,28 @@ +; +; Eine Liste mit allen C3WOC Events +; +;; example use: +; +;; start[] = 1970-01-23 13:37:23 Europe/Berlin +;; ende[] = 1970-01-23 23:42:00 Europe/Berlin +;; event[] = Chaos Creation Code +;; ort[] = Ponyville +;; url[] = 'https://example.com' +; [termine] -datum[0] = foo -event[0] = bar -ort[0] = baz -url[0] = 42 - -datum[] = foo -event[] = bar -ort[] = baz1 -url[] = 42 - -datum[] = foo -event[] = bar -ort[] = baz2 -url[] = 42 +start[0] = 1970-01-23 13:37:23 Europe/Berlin +ende[0] = 1970-01-23 23:42:00 Europe/Berlin +event[0] = Chaos Creation Code +ort[0] = Ponyville +url[0] = 'https://example.com' +;--------------------------------- +start[1] = 1970-01-24 13:37:23 Europe/Berlin +ende[1] = 1970-01-25 23:42:00 Europe/Berlin +event[1] = Chaos Creation Code2 +ort[1] = Ponyville2 +url[1] = 'https://example.com/pr0n' +;--------------------------------- + diff --git a/flowblocks/termine.ini b/flowblocks/termine.ini new file mode 100644 index 0000000..df9f397 --- /dev/null +++ b/flowblocks/termine.ini @@ -0,0 +1,25 @@ +[block] +name = Termin +button_label = Termin + +[fields.start] +label = Start des Events [1970-01-23 13:37:23 Europe/Berlin] +type = datetime + +[fields.start] +label = Ende des Events [1970-01-23 13:37:23 Europe/Berlin] +type = datetime + +[fields.event] +label = Eventname +type = string + +[fields.ort] +label = Veranstaltungsort +type = string + +[fields.url] +label = Link zu weiteren Informationen +type = string + + diff --git a/models/waffeln.ini b/models/waffeln.ini new file mode 100644 index 0000000..ee89f9a --- /dev/null +++ b/models/waffeln.ini @@ -0,0 +1,17 @@ +[model] +name = ICS Feed +label = {{ this.title }} +protected = yes +hidden = yes + +;----------- + +[fields.title] +label = Titel +addon_label = [[header]] +size = large +type = string + + + + diff --git a/templates/blocks/termine.html b/templates/blocks/termine.html new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/templates/blocks/termine.html @@ -0,0 +1 @@ +42 diff --git a/templates/start.html b/templates/start.html index 18742ce..7f0d107 100644 --- a/templates/start.html +++ b/templates/start.html @@ -61,9 +61,24 @@

{{ this.icons_header }}

{{ this.icons_text }} -
{% if this.render_tourdaten %} - {{ bag('termine', 'termine', 'ort[]') }} - {% endif %} + {% + if this.render_tourdaten %}
+
+ + + Datum + Veranstaltung + Ort + + + {% + for x in range(0, 999) %}{% + if bag('termine', 'termine', 'start[' + x|string + ']') is not none %} + + {% set start = bag('termine', 'termine', 'start[' + x|string + ']') %}{{ start }} + {% endif %}{% + endfor %}{% + endif %}
diff --git a/templates/waffeln.ics b/templates/waffeln.ics new file mode 100644 index 0000000..139597f --- /dev/null +++ b/templates/waffeln.ics @@ -0,0 +1,2 @@ + +