Changements des pages pour les tags et assos, qui incluent maintenant une carte

recurrent
echarp 8 years ago
parent 2f27acf267
commit 1973b3c41e
  1. 2
      Gemfile
  2. 30
      Gemfile.lock
  3. 16
      app/assets/javascripts/maps.js.coffee
  4. 3
      app/assets/stylesheets/all.css.sass
  5. 15
      app/assets/stylesheets/lugs.css.sass
  6. 12
      app/assets/stylesheets/maps.css.sass
  7. 82
      app/views/lugs/show.html.haml
  8. 74
      app/views/tags/show.html.haml
  9. 16
      config/locales/views/en.yml
  10. 16
      config/locales/views/fr.yml

@ -70,7 +70,7 @@ gem 'actionview-encoded_mail_to'
gem 'differ'
# A generic library to administrate the tool
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'activeadmin', github: 'activeadmin'
# A nicer markdown editor in active admin
gem 'activeadmin_pagedown'

@ -1,14 +1,6 @@
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
remote: git://github.com/gregbell/active_admin.git
revision: 944af76ace89f941a7baa92775854d2e1d0e6dba
remote: git://github.com/activeadmin/activeadmin.git
revision: 0becbef0918a38b91ad120aba7c2f6641e9b5440
specs:
activeadmin (1.0.0.pre)
arbre (~> 1.0, >= 1.0.2)
@ -24,6 +16,14 @@ GIT
ransack (~> 1.3)
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
remote: git://github.com/svenfuchs/i18n-active_record.git
revision: 2d9a22b6a4e5d809782cdbfa65b14d9e47aa27fc
@ -150,7 +150,7 @@ GEM
actionpack (>= 3.2.13)
formtastic_i18n (0.1.1)
geocoder (1.2.5)
guard (2.6.1)
guard (2.7.0)
formatador (>= 0.2.4)
listen (~> 2.7)
lumberjack (~> 1.0)
@ -232,7 +232,7 @@ GEM
mysql2 (0.3.16)
naught (1.0.0)
orm_adapter (0.5.0)
parser (2.2.0.pre.5)
parser (2.2.0.pre.6)
ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5)
polyamorous (1.1.0)
@ -267,7 +267,7 @@ GEM
thor (>= 0.18.1, < 2.0)
rainbow (2.0.0)
rake (10.3.2)
ransack (1.4.1)
ransack (1.5.0)
actionpack (>= 3.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
@ -329,7 +329,7 @@ GEM
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.9)
temple (0.6.9)
temple (0.6.10)
terminal-table (1.4.5)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
@ -343,7 +343,7 @@ GEM
railties (>= 3.1.1)
tinymce-rails-langs (4.20140129)
tinymce-rails (~> 4.0)
turbolinks (2.4.0)
turbolinks (2.5.1)
coffee-rails
twitter (5.11.0)
addressable (~> 2.3)

@ -6,7 +6,13 @@ $(document).ready ->
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a>'
).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,
onEachFeature: (feature, layer) ->
# Does this feature have a property named popupContent?
@ -30,7 +36,13 @@ $(document).ready ->
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a>'
).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,
onEachFeature: (feature, layer) ->
# Does this feature have a property named popupContent?

@ -139,6 +139,9 @@ main, body.mce-content-body
iframe
border: none
max-width: 100%
margin-bottom: 1.6em
+border-radius(1em)
fieldset
border: none

@ -29,6 +29,8 @@ form#lug_search
color: #258
border: none
padding: 0
margin-top: -0.1em
margin-left: 0
vertical-align: middle
background-color: transparent
+box-shadow(none)
@ -37,17 +39,8 @@ form#lug_search
span.label
display: none
body.lugs.show
iframe
display: block
max-width: 100%
margin-bottom: 2em
+border-radius(1em)
dl
margin-left: 4%
margin-right: 4%
dl, fieldset
body.show
dl, iframe, fieldset
display: inline-block
min-width: 30em
vertical-align: top

@ -14,9 +14,9 @@
&.event
height: 20em
.tags #map
float: right
width: 30%
height: 30em
margin-left: 2%
margin-right: 18%
.tags, .lugs
#map
width: 40%
height: 60em
margin: 1.6em 2%
display: inline-block

@ -6,8 +6,22 @@
= image_tag @lug.url+'/favicon.ico', alt: '', class: :favicon
= title @lug.name
%iframe(src="#{@lug.url}" width='1280' height='300' frameborder='none'
allowTransparency='true')
%nav
= 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
- if @lug.city.present?
@ -23,38 +37,44 @@
%dt= Lug.human_attribute_name :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?
%fieldset
%legend
%em.fa.fa-calendar
= Event.model_name.human.pluralize
%ul
- @events_future.order('start_time asc').each do |event|
%li
= link_to event do
- if event.locality?
%em.locality.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
- else
%em.locality.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
%em.city= event.city
= event.title
= display_date event
%hr
%ul
- @events_past.order('start_time desc').each do |event|
%li
= link_to event do
- if event.locality?
%em.locality.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
- else
%em.locality.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
%em.city= event.city
= event.title
= display_date event
- 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
= link_to event do
- 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'}")
%em.city= event.city
= event.title
%br/
= display_date event
%nav
= link_to lugs_path(q: params[:q], page: params[:page]), class: :back do
%em.fa.fa-arrow-left
= Lug.model_name.human.pluralize
%hr/
- 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
= link_to event do
- 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'}")
%em.city= event.city
= event.title
%br/
= display_date event
#map.events(data-url="#{maps_path format: :json, tag: @lug.name}")

@ -4,30 +4,56 @@
%em= params[:id]
»
= link_to :rss, events_url(format: :rss, tag: params[:id])
\/
= link_to :ical, events_url(format: :ics, tag: params[:id])
%nav
= link_to tags_path, class: :back do
%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
#map.events(data-url="#{maps_path format: :json, tag: params[:id]}")
- 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_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?
%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
- 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
#map.events(data-url="#{maps_path format: :json, tag: params[:id]}")

@ -9,6 +9,14 @@ en:
logout: Disconnect
staleObjectError: Sorry, your modification was rejected because someone else
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
layouts:
@ -150,14 +158,6 @@ it more readable or agreable.
limited: Only tags on more than three events are displayed in this list
show:
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:
index:
title: Events to moderate

@ -9,6 +9,14 @@ fr:
logout: Se déconnecter
staleObjectError: Désolé, votre modification est rejetée car une autre
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
layouts:
@ -150,14 +158,6 @@ fr:
affichés dans cette liste
show:
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:
index:
title: Événements à modérer

Loading…
Cancel
Save