2014-08-06 14:47:47 +02:00
|
|
|
- set_event_meta
|
|
|
|
|
2016-04-08 18:17:54 +02:00
|
|
|
- if @event.tags && @event.tags.include?('libre-en-fete')
|
2016-03-01 23:19:47 +01:00
|
|
|
Cet événement s'inscrit dans le cadre de
|
|
|
|
%a(href='http://www.libre-en-fete.net')
|
|
|
|
= image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete',
|
|
|
|
style: 'vertical-align: middle'
|
|
|
|
|
2014-07-07 11:33:07 +02:00
|
|
|
%h2
|
2014-09-28 00:16:25 +02:00
|
|
|
- if @event.locality?
|
2014-12-13 00:28:44 +01:00
|
|
|
%em.locality.fa.fa-globe{ title: t('attributes.locality_1') }
|
2014-09-28 00:16:25 +02:00
|
|
|
- else
|
2014-12-13 00:28:44 +01:00
|
|
|
%em.locality.fa.fa-shield{ title: t('attributes.locality_0') }
|
|
|
|
%em.city{ title: @event.full_address }= @event.city
|
2014-08-06 14:47:47 +02:00
|
|
|
= title @event.title
|
2014-07-07 11:33:07 +02:00
|
|
|
|
2014-12-13 00:28:44 +01:00
|
|
|
- if controller.controller_name == 'events' && controller.action_name == 'show'
|
2015-02-15 17:10:17 +01:00
|
|
|
%aside#orga-list
|
|
|
|
- if @event.region.present? && @event.region.orgas.present?
|
2014-10-15 01:35:42 +02:00
|
|
|
%h1
|
|
|
|
%em.fa.fa-users
|
2015-02-15 17:10:17 +01:00
|
|
|
= t '.orga-list'
|
2015-02-28 17:28:05 +01:00
|
|
|
%ul.fa-ul
|
2016-01-08 11:23:25 +01:00
|
|
|
- @event.region.orgas.select(&:active).each do |orga|
|
2015-02-28 17:28:05 +01:00
|
|
|
%li
|
|
|
|
= link_to orga do
|
|
|
|
- if orga.kind
|
|
|
|
%em.fa.fa-li{ class: "fa-#{orga.kind.icon}",
|
|
|
|
title: Kind.human_attribute_name("name_#{orga.kind.name}") }
|
|
|
|
= orga.name
|
2016-01-08 11:23:25 +01:00
|
|
|
= image_tag orga.url + '/favicon.ico', alt: '', class: :favicon
|
2014-01-01 21:26:35 +01:00
|
|
|
|
2014-12-21 00:34:30 +01:00
|
|
|
%h1
|
|
|
|
%em.fa.fa-wrench
|
|
|
|
= t '.actions'
|
2014-07-20 18:25:16 +02:00
|
|
|
%h2
|
|
|
|
= link_to event_path @event, protocol: :webcal, format: :ics do
|
|
|
|
%em.fa.fa-lg.fa-calendar
|
2014-12-13 00:28:44 +01:00
|
|
|
= t '.add_to_calendar'
|
|
|
|
%h2
|
|
|
|
= link_to preview_events_path(event: { title: @event.title,
|
|
|
|
start_time: @event.start_time + 1.month,
|
|
|
|
end_time: @event.end_time + 1.month,
|
|
|
|
description: @event.description,
|
2015-03-08 23:41:52 +01:00
|
|
|
place_name: @event.place_name,
|
2014-12-13 00:28:44 +01:00
|
|
|
address: @event.address,
|
|
|
|
city: @event.city,
|
2015-08-20 16:25:52 +02:00
|
|
|
region_id: @event.region.id,
|
2014-12-13 00:28:44 +01:00
|
|
|
locality: @event.locality,
|
|
|
|
url: @event.url,
|
|
|
|
tags: @event.tags }),
|
|
|
|
method: :post do
|
|
|
|
%em.fa.fa-copy
|
|
|
|
= t '.copy'
|
2014-07-20 18:25:16 +02:00
|
|
|
- if user_signed_in?
|
|
|
|
%h2
|
2014-07-01 15:50:39 +02:00
|
|
|
= link_to edit_moderation_path @event do
|
2014-07-20 18:25:16 +02:00
|
|
|
%em.fa.fa-lg.fa-pencil
|
2014-12-13 00:28:44 +01:00
|
|
|
= t '.edit'
|
2014-07-20 18:25:16 +02:00
|
|
|
%h2
|
2014-07-01 15:50:39 +02:00
|
|
|
= link_to cancel_event_path @event, secret: @event.secret do
|
2014-07-20 18:25:16 +02:00
|
|
|
%em.fa.fa-lg.fa-thumbs-down
|
2014-12-13 00:28:44 +01:00
|
|
|
= t '.cancel'
|
2013-12-29 23:25:38 +01:00
|
|
|
|
2014-12-13 00:28:44 +01:00
|
|
|
%h3= t '.dateAndPlace'
|
2014-08-23 16:59:42 +02:00
|
|
|
|
2014-08-26 16:51:52 +02:00
|
|
|
%p= display_date
|
2013-12-29 23:25:38 +01:00
|
|
|
|
2014-08-26 16:51:52 +02:00
|
|
|
%p.full_address
|
2015-03-08 23:41:52 +01:00
|
|
|
- if @event.place_name.present?
|
|
|
|
%span= @event.place_name
|
2014-09-03 18:49:17 +02:00
|
|
|
- if @event.address.present?
|
|
|
|
%span= @event.address
|
2014-12-13 00:28:44 +01:00
|
|
|
%span= link_to @event.city,
|
|
|
|
"http://fr.wikipedia.org/wiki/#{url_encode @event.city}"
|
2015-02-15 15:50:47 +01:00
|
|
|
%span= link_to @event.region.try(:name),
|
|
|
|
"http://fr.wikipedia.org/wiki/#{url_encode @event.region.try :name}"
|
2014-08-23 16:59:42 +02:00
|
|
|
|
|
|
|
- if @event.latitude && @event.longitude
|
2016-09-11 17:40:49 +02:00
|
|
|
.event#map{ data: { url: maps_path(format: :json),
|
|
|
|
latitude: @event.latitude, longitude: @event.longitude } }
|
2013-12-29 23:25:38 +01:00
|
|
|
|
2014-09-21 14:32:59 +02:00
|
|
|
- elsif controller.action_name != 'show'
|
|
|
|
%em.fa.fa-compress
|
|
|
|
%em
|
2014-12-13 00:28:44 +01:00
|
|
|
= raw t '.noMap'
|
|
|
|
%a{ href: 'http://osm.org/search?query=' + @event.full_address }
|
|
|
|
%img(src='http://www.openstreetmap.org/assets/osm_logo.png'
|
|
|
|
alt='OSM logo' width='22px')
|
2014-09-21 14:32:59 +02:00
|
|
|
|
2014-12-13 00:28:44 +01:00
|
|
|
%h3= t '.description'
|
2014-06-21 18:53:05 +02:00
|
|
|
.description
|
2014-10-26 17:13:19 +01:00
|
|
|
= description sanitize @event.description,
|
2015-01-10 14:37:56 +01:00
|
|
|
tags: %w(p h1 h2 h3 h4 br table tr th td ul ol li a strong b em i img),
|
2014-10-03 10:56:37 +02:00
|
|
|
attributes: %w(href src width height style)
|
2013-12-29 23:25:38 +01:00
|
|
|
|
2015-02-28 17:28:05 +01:00
|
|
|
%h3
|
|
|
|
%em.fa.fa-info-circle
|
|
|
|
= t '.infos'
|
2013-12-28 23:45:13 +01:00
|
|
|
%p
|
2015-02-28 17:28:05 +01:00
|
|
|
%em.fa.fa-external-link
|
2014-06-29 12:29:07 +02:00
|
|
|
%span.label= Event.human_attribute_name :url
|
2013-12-29 23:25:38 +01:00
|
|
|
= link_to @event.url, @event.url
|
2013-12-28 23:45:13 +01:00
|
|
|
%p
|
2015-02-28 17:28:05 +01:00
|
|
|
%em.fa.fa-envelope
|
2014-06-29 12:29:07 +02:00
|
|
|
%span.label= Event.human_attribute_name :contact
|
2014-07-18 23:42:33 +02:00
|
|
|
= mail_to @event.contact, nil,
|
|
|
|
encode: (request.format == 'text/html' ? :javascript : nil),
|
|
|
|
replace_at: ' CHEZ ', replace_dot: ' POINT '
|
2013-12-28 23:45:13 +01:00
|
|
|
|
2014-07-01 15:50:39 +02:00
|
|
|
- if @event.tags && @event.tags.present?
|
2014-06-09 20:36:53 +02:00
|
|
|
%p.tags
|
2015-02-28 17:28:05 +01:00
|
|
|
%em.fa.fa-tags
|
2014-06-29 12:29:07 +02:00
|
|
|
%span.label= Event.human_attribute_name :tags
|
2014-06-09 20:36:53 +02:00
|
|
|
- @event.tags.split.each do |tag|
|
2014-11-08 15:47:56 +01:00
|
|
|
= link_to tag, tag_path(tag), rel: :tag
|
2016-09-11 17:40:49 +02:00
|
|
|
|
|
|
|
- if @event.repeat > 0
|
|
|
|
%h3
|
|
|
|
%em.fa.fa-repeat
|
2016-09-17 17:19:41 +02:00
|
|
|
= @event.schedule
|
2016-09-11 17:40:49 +02:00
|
|
|
|
2016-09-17 17:19:41 +02:00
|
|
|
- if @event.moderated?
|
|
|
|
%ul
|
|
|
|
%li= link_to_unless_current @event.event || @event, @event.event || @event
|
|
|
|
- (@event.event || @event).events.each do |e|
|
|
|
|
%li= link_to_unless_current e, e
|