A calendar management project, for events and activities related to communities fighting for freedoms.
This can be related to software, art, data, hardware, content, commons, internet.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.4 KiB

- set_event_meta
%em.city= @event.city
= title @event.title
- if @event.persisted? && request.format == 'text/html' && controller.controller_name == 'events' && controller.action_name == 'show'
- if @event.related_region.lugs.present?
%h1=t '.lug-list'
- if @event.related_region
- @event.related_region.lugs.order(department: :asc).each do |lug|
= link_to lug.name, lug.url
%h1=t '.actions'
= link_to event_path @event, protocol: :webcal, format: :ics do
=t '.add_to_calendar'
- if user_signed_in?
= link_to edit_moderation_path @event do
=t '.edit'
= link_to cancel_event_path @event, secret: @event.secret do
=t '.cancel'
%h3=t '.dateAndPlace'
- if @event.same_day?
Le #{l @event.start_time.to_date, format: :long},
de #{l @event.start_time, format: :hours} à #{l @event.end_time, format: :hours}.
- else
=l @event.start_time, format: :at
#{l @event.end_time, format: :at}.
= raw [@event.address.present? ? @event.address : nil,
link_to(@event.city, "http://fr.wikipedia.org/wiki/#{url_encode @event.city}"),
"http://fr.wikipedia.org/wiki/#{url_encode @event.related_region.name}")].compact.join(', ')
- if @event.latitude && @event.longitude
#map(latitude="#{@event.latitude}" longitude="#{@event.longitude}")
%h3=t '.description'
- markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true)
= description sanitize markdown.render(@event.description),
tags: %w(p br table tr th td ul ol li a strong b em i img),
attributes: %w(href src width height)
%h3=t '.infos'
%span.label= Event.human_attribute_name :url
= link_to @event.url, @event.url
%span.label= Event.human_attribute_name :contact
= mail_to @event.contact, nil,
encode: (request.format == 'text/html' ? :javascript : nil),
replace_at: ' CHEZ ', replace_dot: ' POINT '
- if @event.tags && @event.tags.present?
%span.label= Event.human_attribute_name :tags
- @event.tags.split.each do |tag|
= link_to tag, events_url(tag: tag)