2022-05-10 19:29:24 -04:00
|
|
|
<% if SiteSetting.use_polymorphic_bookmarks %>
|
|
|
|
BEGIN:VCALENDAR
|
|
|
|
VERSION:2.0
|
|
|
|
PRODID:-//Discourse//<%= Discourse.current_hostname %>//<%= Discourse.full_version %>//EN
|
|
|
|
<% @bookmark_reminders.each do |bookmark| %>
|
|
|
|
BEGIN:VEVENT
|
|
|
|
UID:bookmark_reminder_#<%= bookmark.id %>@<%= Discourse.current_hostname %>
|
|
|
|
DTSTAMP:<%= bookmark.updated_at.strftime(I18n.t("datetime_formats.formats.calendar_ics")) %>
|
|
|
|
DTSTART:<%= bookmark.reminder_at_ics_start %>
|
|
|
|
DTEND:<%= bookmark.reminder_at_ics_end %>
|
|
|
|
SUMMARY:<%= bookmark.name.presence || bookmark.title %>
|
|
|
|
DESCRIPTION:<%= bookmark.bookmarkable_url %>
|
|
|
|
URL:<%= bookmark.bookmarkable_url %>
|
|
|
|
END:VEVENT
|
|
|
|
<% end %>
|
|
|
|
END:VCALENDAR
|
|
|
|
|
|
|
|
<% else %>
|
2020-03-17 18:22:41 -04:00
|
|
|
BEGIN:VCALENDAR
|
|
|
|
VERSION:2.0
|
|
|
|
PRODID:-//Discourse//<%= Discourse.current_hostname %>//<%= Discourse.full_version %>//EN
|
|
|
|
<% @bookmark_reminders.each do |bookmark| %>
|
|
|
|
BEGIN:VEVENT
|
|
|
|
UID:bookmark_reminder_#<%= bookmark.id %>@<%= Discourse.current_hostname %>
|
2021-09-14 20:16:54 -04:00
|
|
|
DTSTAMP:<%= bookmark.updated_at.strftime(I18n.t("datetime_formats.formats.calendar_ics")) %>
|
|
|
|
DTSTART:<%= bookmark.reminder_at_ics %>
|
|
|
|
DTEND:<%= bookmark.reminder_at_ics(offset: 1.hour) %>
|
2020-03-17 18:22:41 -04:00
|
|
|
SUMMARY:<%= bookmark.name.presence || bookmark.topic.title %>
|
2020-03-17 19:06:15 -04:00
|
|
|
DESCRIPTION:<%= Discourse.base_url %>/t/-/<%= bookmark.topic_id %>
|
2020-03-17 18:22:41 -04:00
|
|
|
URL:<%= Discourse.base_url %>/t/-/<%= bookmark.topic_id %>
|
|
|
|
END:VEVENT
|
|
|
|
<% end %>
|
|
|
|
END:VCALENDAR
|
2022-05-10 19:29:24 -04:00
|
|
|
<% end %>
|