Commit | Line | Data |
---|---|---|
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 | *} | |
10 | BEGIN:VCALENDAR | |
11 | VERSION:2.0 | |
12 | PRODID:-//CiviCRM//NONSGML CiviEvent iCal//EN | |
13 | X-WR-TIMEZONE:{$timezone} | |
14 | METHOD:PUBLISH | |
15 | {foreach from=$events key=uid item=event} | |
16 | BEGIN:VEVENT | |
17 | UID:{$event.uid} | |
18 | SUMMARY:{$event.title|crmICalText} | |
19 | {if $event.description} | |
20 | DESCRIPTION:{$event.description|crmICalText} | |
21 | {/if} | |
22 | {if $event.event_type} | |
23 | CATEGORIES:{$event.event_type|crmICalText} | |
24 | {/if} | |
25 | CALSCALE:GREGORIAN | |
26 | {if $event.start_date} | |
27 | DTSTAMP;VALUE=DATE-TIME:{$event.start_date|crmICalDate} | |
28 | DTSTART;VALUE=DATE-TIME:{$event.start_date|crmICalDate} | |
29 | {else} | |
30 | DTSTAMP;VALUE=DATE-TIME:{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'|crmICalDate} | |
31 | {/if} | |
32 | {if $event.end_date} | |
33 | DTEND;VALUE=DATE-TIME:{$event.end_date|crmICalDate} | |
34 | {else} | |
35 | DTEND;VALUE=DATE-TIME:{$event.start_date|crmICalDate} | |
36 | {/if} | |
37 | {if $event.is_show_location EQ 1 && $event.location} | |
38 | LOCATION:{$event.location|crmICalText} | |
39 | {/if} | |
40 | {if $event.contact_email} | |
41 | ORGANIZER:MAILTO:{$event.contact_email|crmICalText} | |
42 | {/if} | |
43 | {if $event.url} | |
44 | URL:{$event.url} | |
45 | {/if} | |
46 | END:VEVENT | |
47 | {/foreach} | |
48 | END:VCALENDAR |