Merge pull request #15390 from kewljuice/patch-4
[civicrm-core.git] / templates / CRM / Core / Calendar / ICal.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
1188c7a8 3 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 4 | |
1188c7a8
TO
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
6a488035
TO
8 +--------------------------------------------------------------------+
9*}
10BEGIN:VCALENDAR
11VERSION:2.0
12PRODID:-//CiviCRM//NONSGML CiviEvent iCal//EN
13X-WR-TIMEZONE:{$timezone}
14METHOD:PUBLISH
15{foreach from=$events key=uid item=event}
16BEGIN:VEVENT
17UID:{$event.uid}
18SUMMARY:{$event.title|crmICalText}
19{if $event.description}
20DESCRIPTION:{$event.description|crmICalText}
21{/if}
22{if $event.event_type}
23CATEGORIES:{$event.event_type|crmICalText}
24{/if}
25CALSCALE:GREGORIAN
26{if $event.start_date}
27DTSTAMP;VALUE=DATE-TIME:{$event.start_date|crmICalDate}
28DTSTART;VALUE=DATE-TIME:{$event.start_date|crmICalDate}
29{else}
30DTSTAMP;VALUE=DATE-TIME:{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'|crmICalDate}
31{/if}
32{if $event.end_date}
33DTEND;VALUE=DATE-TIME:{$event.end_date|crmICalDate}
34{else}
35DTEND;VALUE=DATE-TIME:{$event.start_date|crmICalDate}
36{/if}
37{if $event.is_show_location EQ 1 && $event.location}
38LOCATION:{$event.location|crmICalText}
39{/if}
40{if $event.contact_email}
41ORGANIZER:MAILTO:{$event.contact_email|crmICalText}
42{/if}
43{if $event.url}
44URL:{$event.url}
45{/if}
46END:VEVENT
47{/foreach}
48END:VCALENDAR