On peut maintenant consulter un evt par ical
This commit is contained in:
parent
86548c0e1d
commit
542eafc9e6
@ -1,3 +1,5 @@
|
||||
- config.time_zone = 'Paris'
|
||||
|
||||
%form.region_selector
|
||||
- if params[:start_date]
|
||||
= hidden_field_tag :start_date, params[:start_date]
|
||||
|
@ -4,7 +4,7 @@ PRODID:-//AgendaDuLibre.org
|
||||
X-WR-CALNAME:Agenda du Libre
|
||||
X-WR-TIMEZONE:Europe/Paris
|
||||
CALSCALE:GREGORIAN
|
||||
X-WR-CALDESC:L'Agenda des évènements autour du Libre
|
||||
X-WR-CALDESC:<%= t 'title', scope: [:layouts, :application] %>
|
||||
<% @events.each do |event| %>
|
||||
BEGIN:VEVENT
|
||||
DTSTART;TZID=Europe/Paris:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
|
||||
|
@ -13,7 +13,7 @@
|
||||
(#{lug.department})
|
||||
|
||||
%h1=t '.actions'
|
||||
= link_to root_url do
|
||||
= link_to event_path(@event, protocol: :webcal, format: :ics) do
|
||||
%em.fa.fa-calendar
|
||||
=t '.add_to_calendar'
|
||||
- if user_signed_in?
|
||||
|
18
app/views/events/show.ics.erb
Normal file
18
app/views/events/show.ics.erb
Normal file
@ -0,0 +1,18 @@
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//AgendaDuLibre.org
|
||||
X-WR-CALNAME:Agenda du Libre
|
||||
X-WR-TIMEZONE:Europe/Paris
|
||||
CALSCALE:GREGORIAN
|
||||
X-WR-CALDESC:<%= t 'title', scope: [:layouts, :application] %>
|
||||
<% event = @event %>
|
||||
BEGIN:VEVENT
|
||||
DTSTART;TZID=Europe/Paris:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
|
||||
DTEND;TZID=Europe/Paris:<%= event.end_time.strftime '%Y%m%dT%H%M%S' %>
|
||||
UID:<%= event.id %>@agendadulibre.org
|
||||
SUMMARY:<%= event.title %>
|
||||
URL:<%= event_url event %>
|
||||
DESCRIPTION:Un évènement de l'Agenda du Libre
|
||||
LOCATION:<%= event.city.gsub('-', ' ') %>
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
@ -15,7 +15,6 @@ module AgendaDuLibreRails
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
# config.time_zone = 'Central Time (US & Canada)'
|
||||
config.time_zone = 'Paris'
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
@ -24,7 +23,10 @@ module AgendaDuLibreRails
|
||||
|
||||
I18n.config.enforce_available_locales = true
|
||||
|
||||
config.action_mailer.default_options = {from: 'moderateurs@agendadulibre.org', to: 'moderateurs@agendadulibre.org'}
|
||||
config.action_mailer.default_options = {
|
||||
from: 'moderateurs@agendadulibre.org',
|
||||
to: 'moderateurs@agendadulibre.org'
|
||||
}
|
||||
|
||||
#config.quiet_assets = false
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user