Il est maintenant possible de dupliquer un événement
This commit is contained in:
parent
42b80e3583
commit
abb881405d
3
app/assets/stylesheets/stats.css.sass
Normal file
3
app/assets/stylesheets/stats.css.sass
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
table tfoot td canvas
|
||||||
|
width: 100% !important
|
||||||
|
background-color: white
|
@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
%h2
|
%h2
|
||||||
- if @event.locality?
|
- if @event.locality?
|
||||||
%em.locality.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
|
%em.locality.fa.fa-globe{ title: t('attributes.locality_1') }
|
||||||
- else
|
- else
|
||||||
%em.locality.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
|
%em.locality.fa.fa-shield{ title: t('attributes.locality_0') }
|
||||||
%em.city(title="#{@event.full_address}")= @event.city
|
%em.city{ title: @event.full_address }= @event.city
|
||||||
= title @event.title
|
= title @event.title
|
||||||
|
|
||||||
- if @event.persisted? && request.format == 'text/html' && controller.controller_name == 'events' && controller.action_name == 'show'
|
- if controller.controller_name == 'events' && controller.action_name == 'show'
|
||||||
%aside#lug-list
|
%aside#lug-list
|
||||||
- if @event.related_region.lugs.present?
|
- if @event.related_region.lugs.present?
|
||||||
%h1
|
%h1
|
||||||
%em.fa.fa-users
|
%em.fa.fa-users
|
||||||
=t '.lug-list'
|
= t '.lug-list'
|
||||||
- if @event.related_region
|
- if @event.related_region
|
||||||
%ul
|
%ul
|
||||||
- @event.related_region.lugs.order(department: :asc).each do |lug|
|
- @event.related_region.lugs.order(department: :asc).each do |lug|
|
||||||
@ -21,54 +21,70 @@
|
|||||||
= link_to lug.name, lug
|
= link_to lug.name, lug
|
||||||
(#{lug.department})
|
(#{lug.department})
|
||||||
= link_to lug.url do
|
= link_to lug.url do
|
||||||
= image_tag lug.url+'/favicon.ico', alt: '', class: :favicon
|
= image_tag lug.url + '/favicon.ico', alt: '', class: :favicon
|
||||||
|
|
||||||
%h1=t '.actions'
|
%h1= t '.actions'
|
||||||
%h2
|
%h2
|
||||||
= link_to event_path @event, protocol: :webcal, format: :ics do
|
= link_to event_path @event, protocol: :webcal, format: :ics do
|
||||||
%em.fa.fa-lg.fa-calendar
|
%em.fa.fa-lg.fa-calendar
|
||||||
=t '.add_to_calendar'
|
= 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,
|
||||||
|
address: @event.address,
|
||||||
|
city: @event.city,
|
||||||
|
region: @event.region,
|
||||||
|
locality: @event.locality,
|
||||||
|
url: @event.url,
|
||||||
|
contact: @event.contact,
|
||||||
|
submitter: @event.submitter,
|
||||||
|
tags: @event.tags }),
|
||||||
|
method: :post do
|
||||||
|
%em.fa.fa-copy
|
||||||
|
= t '.copy'
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
%h2
|
%h2
|
||||||
= link_to edit_moderation_path @event do
|
= link_to edit_moderation_path @event do
|
||||||
%em.fa.fa-lg.fa-pencil
|
%em.fa.fa-lg.fa-pencil
|
||||||
=t '.edit'
|
= t '.edit'
|
||||||
%h2
|
%h2
|
||||||
= link_to cancel_event_path @event, secret: @event.secret do
|
= link_to cancel_event_path @event, secret: @event.secret do
|
||||||
%em.fa.fa-lg.fa-thumbs-down
|
%em.fa.fa-lg.fa-thumbs-down
|
||||||
=t '.cancel'
|
= t '.cancel'
|
||||||
|
|
||||||
%h3=t '.dateAndPlace'
|
%h3= t '.dateAndPlace'
|
||||||
|
|
||||||
%p= display_date
|
%p= display_date
|
||||||
|
|
||||||
%p.full_address
|
%p.full_address
|
||||||
- if @event.address.present?
|
- if @event.address.present?
|
||||||
%span= @event.address
|
%span= @event.address
|
||||||
%span= link_to @event.city, "http://fr.wikipedia.org/wiki/#{url_encode @event.city}"
|
%span= link_to @event.city,
|
||||||
|
"http://fr.wikipedia.org/wiki/#{url_encode @event.city}"
|
||||||
%span= link_to @event.related_region.try(:name),
|
%span= link_to @event.related_region.try(:name),
|
||||||
"http://fr.wikipedia.org/wiki/#{url_encode @event.related_region.try(:name)}"
|
"http://fr.wikipedia.org/wiki/#{url_encode @event.related_region.try :name}"
|
||||||
|
|
||||||
- if @event.latitude && @event.longitude
|
- if @event.latitude && @event.longitude
|
||||||
#map.event{ data: { |
|
.event#map{ data: { url: "#{maps_path format: :json}",
|
||||||
url: "#{maps_path format: :json}", |
|
latitude: "#{@event.latitude}", longitude: "#{@event.longitude}" } }
|
||||||
latitude: "#{@event.latitude}", |
|
|
||||||
longitude: "#{@event.longitude}" } } |
|
|
||||||
|
|
||||||
- elsif controller.action_name != 'show'
|
- elsif controller.action_name != 'show'
|
||||||
%em.fa.fa-compress
|
%em.fa.fa-compress
|
||||||
%em
|
%em
|
||||||
=raw t '.noMap'
|
= raw t '.noMap'
|
||||||
%a(href="http://osm.org/search?query=#{@event.full_address}")
|
%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')
|
%img(src='http://www.openstreetmap.org/assets/osm_logo.png'
|
||||||
|
alt='OSM logo' width='22px')
|
||||||
|
|
||||||
%h3=t '.description'
|
%h3= t '.description'
|
||||||
.description
|
.description
|
||||||
= description sanitize @event.description,
|
= description sanitize @event.description,
|
||||||
tags: %w(p br table tr th td ul ol li a strong b em i img),
|
tags: %w(p br table tr th td ul ol li a strong b em i img),
|
||||||
attributes: %w(href src width height style)
|
attributes: %w(href src width height style)
|
||||||
|
|
||||||
%h3=t '.infos'
|
%h3= t '.infos'
|
||||||
%p
|
%p
|
||||||
%span.label= Event.human_attribute_name :url
|
%span.label= Event.human_attribute_name :url
|
||||||
= link_to @event.url, @event.url
|
= link_to @event.url, @event.url
|
||||||
|
@ -44,6 +44,7 @@ en:
|
|||||||
show:
|
show:
|
||||||
lug-list: Region's associations
|
lug-list: Region's associations
|
||||||
add_to_calendar: Add to my calendar
|
add_to_calendar: Add to my calendar
|
||||||
|
copy: Duplicate event
|
||||||
at: At
|
at: At
|
||||||
dateAndPlace: Date and place
|
dateAndPlace: Date and place
|
||||||
noMap: No OpenStreetMap map could be associated to this address. You can
|
noMap: No OpenStreetMap map could be associated to this address. You can
|
||||||
|
@ -44,6 +44,7 @@ fr:
|
|||||||
show:
|
show:
|
||||||
lug-list: Asso de la région
|
lug-list: Asso de la région
|
||||||
add_to_calendar: Ajouter à mon calendrier
|
add_to_calendar: Ajouter à mon calendrier
|
||||||
|
copy: Dupliquer événement
|
||||||
at: À
|
at: À
|
||||||
dateAndPlace: Date et lieu
|
dateAndPlace: Date et lieu
|
||||||
noMap: Aucune carte OpenStreetMap n'a pu être associée à cette adresse.
|
noMap: Aucune carte OpenStreetMap n'a pu être associée à cette adresse.
|
||||||
|
Loading…
Reference in New Issue
Block a user