From 8b36926ff029a24fbf5038a5aff96ae416b68c2d Mon Sep 17 00:00:00 2001 From: L3D Date: Thu, 14 Feb 2019 15:45:50 +0100 Subject: [PATCH] Improved ics --- flowblocks/termine.ini | 6 ++++++ templates/waffeln.ics | 42 +++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/flowblocks/termine.ini b/flowblocks/termine.ini index c5c3eaf..0b96262 100644 --- a/flowblocks/termine.ini +++ b/flowblocks/termine.ini @@ -22,4 +22,10 @@ type = string label = Link zu weiteren Informationen type = string +[fields.summary] +label = Beschreibung +type = text +[fields.confirmed] +label = Status: bestÃĪtigt? +type = boolean diff --git a/templates/waffeln.ics b/templates/waffeln.ics index 43b2336..1c058b7 100644 --- a/templates/waffeln.ics +++ b/templates/waffeln.ics @@ -1,25 +1,21 @@ -BEGIN:VCALENDAR +{% set fqdn = 'c3woc.de' +%}BEGIN:VCALENDAR VERSION:2.0 -PRODID:{{ this.url }}http://www.example.com/calendarapplication/ -METHOD:PUBLISH +CALSCALE:GREGORIAN +PRODID:https://{{ fqdn }}/{{ this._id }} +METHOD:PUBLISH{% + for blk in this.termine.blocks %} BEGIN:VEVENT -UID:461092315540@example.com -ORGANIZER;CN="Alice Balder, Example Inc.":MAILTO:alice@example.com -LOCATION:Irgendwo -GEO:48.85299;2.36885 -SUMMARY:Eine Kurzinfo -DESCRIPTION:Beschreibung des Termines -CLASS:PUBLIC -DTSTART:20060910T220000Z -DTEND:20060919T215900Z -DTSTAMP:20060812T125900Z -END:VEVENT -END:VCALENDAR - -{{ this._gid }} - -{% for blk in this.termine.blocks %} - {{ blk }} - {{ blk.start }} -{% endfor %} - {{ this }} +SUMMARY:{{ blk.event }} +ORGANIZER;CN="C3 Waffel Operation Center":MAILTO:waffel@{{ fqdn }} +DTSTART;TZID=Europe/Berlin:{{ blk.start.strftime('%Y%m%dT%H%M%S') }} +DTEND;TZID=Europe/Berlin:{{ blk.ende.strftime('%Y%m%dT%H%M%S') }} +STATUS:{% + if blk.confirmed %}CONFIRMED{% + else %}TENTATIVE{% endif %} +LOCATION:{{ blk.ort }} +SUMMARY:{{ blk.summary }} +DESCRIPTION:{{ blk.url }} +END:VEVENT{% + endfor %} +END:VCALENDAR