Changements des pages pour les tags et assos, qui incluent maintenant une carte
This commit is contained in:
parent
2f27acf267
commit
1973b3c41e
2
Gemfile
2
Gemfile
@ -70,7 +70,7 @@ gem 'actionview-encoded_mail_to'
|
|||||||
gem 'differ'
|
gem 'differ'
|
||||||
|
|
||||||
# A generic library to administrate the tool
|
# A generic library to administrate the tool
|
||||||
gem 'activeadmin', github: 'gregbell/active_admin'
|
gem 'activeadmin', github: 'activeadmin'
|
||||||
# A nicer markdown editor in active admin
|
# A nicer markdown editor in active admin
|
||||||
gem 'activeadmin_pagedown'
|
gem 'activeadmin_pagedown'
|
||||||
|
|
||||||
|
30
Gemfile.lock
30
Gemfile.lock
@ -1,14 +1,6 @@
|
|||||||
GIT
|
GIT
|
||||||
remote: git://github.com/cubus/jquery-sparkline-rails.git
|
remote: git://github.com/activeadmin/activeadmin.git
|
||||||
revision: 5c2ced0fa68e5e099bec82b67bdf71f9d865da8a
|
revision: 0becbef0918a38b91ad120aba7c2f6641e9b5440
|
||||||
specs:
|
|
||||||
jquery-sparkline-rails (2.1.1)
|
|
||||||
jquery-rails
|
|
||||||
rails (>= 3.2.2)
|
|
||||||
|
|
||||||
GIT
|
|
||||||
remote: git://github.com/gregbell/active_admin.git
|
|
||||||
revision: 944af76ace89f941a7baa92775854d2e1d0e6dba
|
|
||||||
specs:
|
specs:
|
||||||
activeadmin (1.0.0.pre)
|
activeadmin (1.0.0.pre)
|
||||||
arbre (~> 1.0, >= 1.0.2)
|
arbre (~> 1.0, >= 1.0.2)
|
||||||
@ -24,6 +16,14 @@ GIT
|
|||||||
ransack (~> 1.3)
|
ransack (~> 1.3)
|
||||||
sass-rails
|
sass-rails
|
||||||
|
|
||||||
|
GIT
|
||||||
|
remote: git://github.com/cubus/jquery-sparkline-rails.git
|
||||||
|
revision: 5c2ced0fa68e5e099bec82b67bdf71f9d865da8a
|
||||||
|
specs:
|
||||||
|
jquery-sparkline-rails (2.1.1)
|
||||||
|
jquery-rails
|
||||||
|
rails (>= 3.2.2)
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/svenfuchs/i18n-active_record.git
|
remote: git://github.com/svenfuchs/i18n-active_record.git
|
||||||
revision: 2d9a22b6a4e5d809782cdbfa65b14d9e47aa27fc
|
revision: 2d9a22b6a4e5d809782cdbfa65b14d9e47aa27fc
|
||||||
@ -150,7 +150,7 @@ GEM
|
|||||||
actionpack (>= 3.2.13)
|
actionpack (>= 3.2.13)
|
||||||
formtastic_i18n (0.1.1)
|
formtastic_i18n (0.1.1)
|
||||||
geocoder (1.2.5)
|
geocoder (1.2.5)
|
||||||
guard (2.6.1)
|
guard (2.7.0)
|
||||||
formatador (>= 0.2.4)
|
formatador (>= 0.2.4)
|
||||||
listen (~> 2.7)
|
listen (~> 2.7)
|
||||||
lumberjack (~> 1.0)
|
lumberjack (~> 1.0)
|
||||||
@ -232,7 +232,7 @@ GEM
|
|||||||
mysql2 (0.3.16)
|
mysql2 (0.3.16)
|
||||||
naught (1.0.0)
|
naught (1.0.0)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
parser (2.2.0.pre.5)
|
parser (2.2.0.pre.6)
|
||||||
ast (>= 1.1, < 3.0)
|
ast (>= 1.1, < 3.0)
|
||||||
slop (~> 3.4, >= 3.4.5)
|
slop (~> 3.4, >= 3.4.5)
|
||||||
polyamorous (1.1.0)
|
polyamorous (1.1.0)
|
||||||
@ -267,7 +267,7 @@ GEM
|
|||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rainbow (2.0.0)
|
rainbow (2.0.0)
|
||||||
rake (10.3.2)
|
rake (10.3.2)
|
||||||
ransack (1.4.1)
|
ransack (1.5.0)
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 3.0)
|
||||||
activerecord (>= 3.0)
|
activerecord (>= 3.0)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
@ -329,7 +329,7 @@ GEM
|
|||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
sprockets (>= 2.8, < 4.0)
|
sprockets (>= 2.8, < 4.0)
|
||||||
sqlite3 (1.3.9)
|
sqlite3 (1.3.9)
|
||||||
temple (0.6.9)
|
temple (0.6.10)
|
||||||
terminal-table (1.4.5)
|
terminal-table (1.4.5)
|
||||||
therubyracer (0.12.1)
|
therubyracer (0.12.1)
|
||||||
libv8 (~> 3.16.14.0)
|
libv8 (~> 3.16.14.0)
|
||||||
@ -343,7 +343,7 @@ GEM
|
|||||||
railties (>= 3.1.1)
|
railties (>= 3.1.1)
|
||||||
tinymce-rails-langs (4.20140129)
|
tinymce-rails-langs (4.20140129)
|
||||||
tinymce-rails (~> 4.0)
|
tinymce-rails (~> 4.0)
|
||||||
turbolinks (2.4.0)
|
turbolinks (2.5.1)
|
||||||
coffee-rails
|
coffee-rails
|
||||||
twitter (5.11.0)
|
twitter (5.11.0)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.3)
|
||||||
|
@ -6,7 +6,13 @@ $(document).ready ->
|
|||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>'
|
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>'
|
||||||
).addTo map
|
).addTo map
|
||||||
|
|
||||||
$.getJSON $(this).data('url') + location.search, (json) ->
|
url = $(this).data 'url'
|
||||||
|
if location.search && url.indexOf '?'
|
||||||
|
url += '&' + location.search.substr 1
|
||||||
|
else
|
||||||
|
url += location.search
|
||||||
|
|
||||||
|
$.getJSON url, (json) ->
|
||||||
layer = L.geoJson json,
|
layer = L.geoJson json,
|
||||||
onEachFeature: (feature, layer) ->
|
onEachFeature: (feature, layer) ->
|
||||||
# Does this feature have a property named popupContent?
|
# Does this feature have a property named popupContent?
|
||||||
@ -30,7 +36,13 @@ $(document).ready ->
|
|||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>'
|
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>'
|
||||||
).addTo map
|
).addTo map
|
||||||
|
|
||||||
$.getJSON $(this).data('url') + location.search, (json) ->
|
url = $(this).data 'url'
|
||||||
|
if location.search && url.indexOf '?'
|
||||||
|
url += '&' + location.search.substr 1
|
||||||
|
else
|
||||||
|
url += location.search
|
||||||
|
|
||||||
|
$.getJSON url, (json) ->
|
||||||
layer = L.geoJson json,
|
layer = L.geoJson json,
|
||||||
onEachFeature: (feature, layer) ->
|
onEachFeature: (feature, layer) ->
|
||||||
# Does this feature have a property named popupContent?
|
# Does this feature have a property named popupContent?
|
||||||
|
@ -139,6 +139,9 @@ main, body.mce-content-body
|
|||||||
|
|
||||||
iframe
|
iframe
|
||||||
border: none
|
border: none
|
||||||
|
max-width: 100%
|
||||||
|
margin-bottom: 1.6em
|
||||||
|
+border-radius(1em)
|
||||||
|
|
||||||
fieldset
|
fieldset
|
||||||
border: none
|
border: none
|
||||||
|
@ -29,6 +29,8 @@ form#lug_search
|
|||||||
color: #258
|
color: #258
|
||||||
border: none
|
border: none
|
||||||
padding: 0
|
padding: 0
|
||||||
|
margin-top: -0.1em
|
||||||
|
margin-left: 0
|
||||||
vertical-align: middle
|
vertical-align: middle
|
||||||
background-color: transparent
|
background-color: transparent
|
||||||
+box-shadow(none)
|
+box-shadow(none)
|
||||||
@ -37,17 +39,8 @@ form#lug_search
|
|||||||
span.label
|
span.label
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
body.lugs.show
|
body.show
|
||||||
iframe
|
dl, iframe, fieldset
|
||||||
display: block
|
|
||||||
max-width: 100%
|
|
||||||
margin-bottom: 2em
|
|
||||||
+border-radius(1em)
|
|
||||||
|
|
||||||
dl
|
|
||||||
margin-left: 4%
|
|
||||||
margin-right: 4%
|
|
||||||
dl, fieldset
|
|
||||||
display: inline-block
|
display: inline-block
|
||||||
min-width: 30em
|
min-width: 30em
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
&.event
|
&.event
|
||||||
height: 20em
|
height: 20em
|
||||||
|
|
||||||
.tags #map
|
.tags, .lugs
|
||||||
float: right
|
#map
|
||||||
width: 30%
|
width: 40%
|
||||||
height: 30em
|
height: 60em
|
||||||
margin-left: 2%
|
margin: 1.6em 2%
|
||||||
margin-right: 18%
|
display: inline-block
|
||||||
|
@ -6,8 +6,22 @@
|
|||||||
= image_tag @lug.url+'/favicon.ico', alt: '', class: :favicon
|
= image_tag @lug.url+'/favicon.ico', alt: '', class: :favicon
|
||||||
= title @lug.name
|
= title @lug.name
|
||||||
|
|
||||||
%iframe(src="#{@lug.url}" width='1280' height='300' frameborder='none'
|
%nav
|
||||||
allowTransparency='true')
|
= link_to lugs_path(q: params[:q], page: params[:page]), class: :back do
|
||||||
|
%em.fa.fa-arrow-left
|
||||||
|
= Lug.model_name.human.pluralize
|
||||||
|
\/
|
||||||
|
= link_to events_url format: :rss, tag: @lug.name do
|
||||||
|
%em.fa.fa-rss
|
||||||
|
rss
|
||||||
|
\/
|
||||||
|
= link_to events_url format: :ics, tag: @lug.name do
|
||||||
|
%em.fa.fa-th-list
|
||||||
|
ical
|
||||||
|
\/
|
||||||
|
= link_to maps_url format: :json, tag: @lug.name do
|
||||||
|
%em.fa.fa-map-marker
|
||||||
|
geojson
|
||||||
|
|
||||||
%dl
|
%dl
|
||||||
- if @lug.city.present?
|
- if @lug.city.present?
|
||||||
@ -23,38 +37,44 @@
|
|||||||
%dt= Lug.human_attribute_name :url
|
%dt= Lug.human_attribute_name :url
|
||||||
%dd= link_to @lug.url, @lug.url
|
%dd= link_to @lug.url, @lug.url
|
||||||
|
|
||||||
|
%iframe(src="#{@lug.url}" width='1280' height='300' frameborder='none'
|
||||||
|
allowTransparency='true')
|
||||||
|
|
||||||
- if @events_future.any? || @events_past.any?
|
- if @events_future.any? || @events_past.any?
|
||||||
%fieldset
|
%fieldset
|
||||||
%legend
|
%legend
|
||||||
%em.fa.fa-calendar
|
%em.fa.fa-calendar
|
||||||
= Event.model_name.human.pluralize
|
= Event.model_name.human.pluralize
|
||||||
%ul
|
- if @events_future.any?
|
||||||
- @events_future.order('start_time asc').each do |event|
|
%h3=raw t 'future', count: @events_future.count
|
||||||
%li
|
%ul.fa-ul
|
||||||
= link_to event do
|
- @events_future.order('start_time asc').each do |event|
|
||||||
- if event.locality?
|
%li
|
||||||
%em.locality.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
|
= link_to event do
|
||||||
- else
|
- if event.locality?
|
||||||
%em.locality.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
|
%em.locality.fa-li.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
|
||||||
%em.city= event.city
|
- else
|
||||||
= event.title
|
%em.locality.fa-li.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
|
||||||
= display_date event
|
%em.city= event.city
|
||||||
|
= event.title
|
||||||
|
%br/
|
||||||
|
= display_date event
|
||||||
|
|
||||||
%hr
|
%hr/
|
||||||
|
|
||||||
%ul
|
- if @events_past.any?
|
||||||
- @events_past.order('start_time desc').each do |event|
|
%h3=raw t 'past', count: @events_past.count
|
||||||
%li
|
%ul.fa-ul
|
||||||
= link_to event do
|
- @events_past.order('start_time desc').each do |event|
|
||||||
- if event.locality?
|
%li
|
||||||
%em.locality.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
|
= link_to event do
|
||||||
- else
|
- if event.locality?
|
||||||
%em.locality.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
|
%em.locality.fa-li.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
|
||||||
%em.city= event.city
|
- else
|
||||||
= event.title
|
%em.locality.fa-li.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
|
||||||
= display_date event
|
%em.city= event.city
|
||||||
|
= event.title
|
||||||
|
%br/
|
||||||
|
= display_date event
|
||||||
|
|
||||||
%nav
|
#map.events(data-url="#{maps_path format: :json, tag: @lug.name}")
|
||||||
= link_to lugs_path(q: params[:q], page: params[:page]), class: :back do
|
|
||||||
%em.fa.fa-arrow-left
|
|
||||||
= Lug.model_name.human.pluralize
|
|
||||||
|
@ -4,30 +4,56 @@
|
|||||||
%em= params[:id]
|
%em= params[:id]
|
||||||
»
|
»
|
||||||
|
|
||||||
= link_to :rss, events_url(format: :rss, tag: params[:id])
|
%nav
|
||||||
\/
|
= link_to tags_path, class: :back do
|
||||||
= link_to :ical, events_url(format: :ics, tag: params[:id])
|
%em.fa.fa-arrow-left
|
||||||
|
= Event.human_attribute_name(:tag).pluralize
|
||||||
|
\/
|
||||||
|
= link_to events_url format: :rss, tag: params[:id] do
|
||||||
|
%em.fa.fa-rss
|
||||||
|
rss
|
||||||
|
\/
|
||||||
|
= link_to events_url format: :ics, tag: params[:id] do
|
||||||
|
%em.fa.fa-th-list
|
||||||
|
ical
|
||||||
|
\/
|
||||||
|
= link_to maps_url format: :json, tag: params[:id] do
|
||||||
|
%em.fa.fa-map-marker
|
||||||
|
geojson
|
||||||
|
|
||||||
|
- if @events_future.any? || @events_past.any?
|
||||||
|
%fieldset
|
||||||
|
%legend
|
||||||
|
%em.fa.fa-calendar
|
||||||
|
= Event.model_name.human.pluralize
|
||||||
|
- if @events_future.any?
|
||||||
|
%h3=raw t 'future', count: @events_future.count
|
||||||
|
%ul.fa-ul
|
||||||
|
- @events_future.order('start_time asc').each do |event|
|
||||||
|
%li
|
||||||
|
- if event.locality?
|
||||||
|
%em.locality.fa-li.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
|
||||||
|
- else
|
||||||
|
%em.locality.fa-li.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
|
||||||
|
= link_to event do
|
||||||
|
%em.city= event.city
|
||||||
|
= event.title
|
||||||
|
%br/
|
||||||
|
= display_date event
|
||||||
|
|
||||||
|
- if @events_past.any?
|
||||||
|
%h3=raw t 'past', count: @events_past.count
|
||||||
|
%ul.fa-ul
|
||||||
|
- @events_past.order('start_time desc').each do |event|
|
||||||
|
%li
|
||||||
|
- if event.locality?
|
||||||
|
%em.locality.fa-li.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
|
||||||
|
- else
|
||||||
|
%em.locality.fa-li.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
|
||||||
|
= link_to event do
|
||||||
|
%em.city= event.city
|
||||||
|
= event.title
|
||||||
|
%br/
|
||||||
|
= display_date event
|
||||||
|
|
||||||
#map.events(data-url="#{maps_path format: :json, tag: params[:id]}")
|
#map.events(data-url="#{maps_path format: :json, tag: params[:id]}")
|
||||||
|
|
||||||
- if @events_future.any?
|
|
||||||
%p=raw t '.future', count: @events_future.count
|
|
||||||
%ul
|
|
||||||
- @events_future.order('start_time asc').each do |event|
|
|
||||||
%li
|
|
||||||
%div
|
|
||||||
= link_to event do
|
|
||||||
%em.city= event.city
|
|
||||||
= event.title
|
|
||||||
= display_date event
|
|
||||||
|
|
||||||
- if @events_past.any?
|
|
||||||
%p=raw t '.past', count: @events_past.count
|
|
||||||
%ul
|
|
||||||
- @events_past.order('start_time desc').each do |event|
|
|
||||||
%li
|
|
||||||
%div
|
|
||||||
= link_to event do
|
|
||||||
%em.city= event.city
|
|
||||||
= event.title
|
|
||||||
= display_date event
|
|
||||||
|
@ -9,6 +9,14 @@ en:
|
|||||||
logout: Disconnect
|
logout: Disconnect
|
||||||
staleObjectError: Sorry, your modification was rejected because someone else
|
staleObjectError: Sorry, your modification was rejected because someone else
|
||||||
already intervened
|
already intervened
|
||||||
|
future:
|
||||||
|
zero:
|
||||||
|
one: "<strong>In the future</strong>, %{count} event:"
|
||||||
|
other: "<strong>In the future</strong>, %{count} evens:"
|
||||||
|
past:
|
||||||
|
zero:
|
||||||
|
one: "<strong>In the past</strong>, %{count} event:"
|
||||||
|
other: "<strong>In the past</strong>, %{count} events:"
|
||||||
|
|
||||||
# Translatings screens
|
# Translatings screens
|
||||||
layouts:
|
layouts:
|
||||||
@ -150,14 +158,6 @@ it more readable or agreable.
|
|||||||
limited: Only tags on more than three events are displayed in this list
|
limited: Only tags on more than three events are displayed in this list
|
||||||
show:
|
show:
|
||||||
title: Events
|
title: Events
|
||||||
future:
|
|
||||||
zero:
|
|
||||||
one: "<strong>In the future</strong>, %{count} event:"
|
|
||||||
other: "<strong>In the future</strong>, %{count} evens:"
|
|
||||||
past:
|
|
||||||
zero:
|
|
||||||
one: "<strong>In the past</strong>, %{count} event:"
|
|
||||||
other: "<strong>In the past</strong>, %{count} events:"
|
|
||||||
moderations:
|
moderations:
|
||||||
index:
|
index:
|
||||||
title: Events to moderate
|
title: Events to moderate
|
||||||
|
@ -9,6 +9,14 @@ fr:
|
|||||||
logout: Se déconnecter
|
logout: Se déconnecter
|
||||||
staleObjectError: Désolé, votre modification est rejetée car une autre
|
staleObjectError: Désolé, votre modification est rejetée car une autre
|
||||||
personne est déjà intervenue
|
personne est déjà intervenue
|
||||||
|
future:
|
||||||
|
zero:
|
||||||
|
one: "<strong>Prochainement</strong>, %{count} événement:"
|
||||||
|
other: "<strong>Prochainement</strong>, %{count} événements:"
|
||||||
|
past:
|
||||||
|
zero:
|
||||||
|
one: "<strong>Dans le passé</strong>, %{count} événement:"
|
||||||
|
other: "<strong>Dans le passé</strong>, %{count} événements:"
|
||||||
|
|
||||||
# Traductions des écrans
|
# Traductions des écrans
|
||||||
layouts:
|
layouts:
|
||||||
@ -150,14 +158,6 @@ fr:
|
|||||||
affichés dans cette liste
|
affichés dans cette liste
|
||||||
show:
|
show:
|
||||||
title: Les événements
|
title: Les événements
|
||||||
future:
|
|
||||||
zero:
|
|
||||||
one: "<strong>Prochainement</strong>, %{count} événement:"
|
|
||||||
other: "<strong>Prochainement</strong>, %{count} événements:"
|
|
||||||
past:
|
|
||||||
zero:
|
|
||||||
one: "<strong>Dans le passé</strong>, %{count} événement:"
|
|
||||||
other: "<strong>Dans le passé</strong>, %{count} événements:"
|
|
||||||
moderations:
|
moderations:
|
||||||
index:
|
index:
|
||||||
title: Événements à modérer
|
title: Événements à modérer
|
||||||
|
Loading…
Reference in New Issue
Block a user