Skip to content
Snippets Groups Projects
Unverified Commit 246d53ed authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

cal_provider_url

parent f5084184
No related branches found
No related tags found
No related merge requests found
......@@ -17,15 +17,36 @@ module Communication::Website::Agenda::Event::WithCal
)
end
def cal_google_url
add_to_calendar_urls['google']
end
def cal_yahoo_url
add_to_calendar_urls['yahoo']
end
def cal_office_url
add_to_calendar_urls['office']
end
def cal_outlook_url
add_to_calendar_urls['outlook']
end
def cal_ical_url
add_to_calendar_urls['ical']
end
protected
def set_add_to_calendar_urls
self.add_to_calendar_urls = {
google: cal.google_url,
yahoo: cal.yahoo_url,
office: cal.office365_url,
outlook: cal.outlook_com_url,
ical: cal.ical_url
'google' => cal.google_url,
'yahoo' => cal.yahoo_url,
'office' => cal.office365_url,
'outlook' => cal.outlook_com_url,
'ical' => cal.ical_url
}
end
......
......@@ -26,8 +26,8 @@ indentation = ' ' * depth
<%= indentation %> hour: <%= event.to_hour.strftime "%H:%M" %>
<% end %>
<%= indentation %> add_to_calendar:
<%= indentation %> google: "<%= event.add_to_calendar_urls['google'].html_safe %>"
<%= indentation %> yahoo: "<%= event.add_to_calendar_urls['yahoo'].html_safe %>"
<%= indentation %> office: "<%= event.add_to_calendar_urls['office'].html_safe %>"
<%= indentation %> outlook: "<%= event.add_to_calendar_urls['outlook'].html_safe %>"
<%= indentation %> ical: "<%= event.add_to_calendar_urls['ical'].html_safe %>"
<%= indentation %> google: "<%= event.cal_google_url.html_safe %>"
<%= indentation %> yahoo: "<%= event.cal_yahoo_url.html_safe %>"
<%= indentation %> office: "<%= event.cal_office_url.html_safe %>"
<%= indentation %> outlook: "<%= event.cal_outlook_url.html_safe %>"
<%= indentation %> ical: "<%= event.cal_ical_url.html_safe %>"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment