Skip to content
Extraits de code Groupes Projets
Valider 6358cde1 rédigé par echarp's avatar echarp
Parcourir les fichiers

Ajout de liens vers geojson

parent 5d643a5a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -7,7 +7,7 @@ $(document).ready ->
).addTo map
url = $(this).data 'url'
if location.search && url.indexOf '?'
if location.search && url.indexOf('?') >= 0
url += '&' + location.search.substr 1
else
url += location.search
......
......@@ -231,8 +231,7 @@ footer.bottom nav
clear: both
a
display: inline-block
padding: 2em 1%
padding-bottom: 0
padding: 1.8%
em.fa
font-size: x-large
&:hover
......
......@@ -11,17 +11,25 @@
%em.fa.fa-arrow-left
= Lug.model_name.human.pluralize
\/
= link_to events_url tag: @lug.name do
%em.fa.fa-calendar
Agenda
\/
= link_to events_url format: :rss, tag: @lug.name do
%em.fa.fa-rss
rss
RSS
\/
= link_to events_url format: :ics, tag: @lug.name do
%em.fa.fa-th-list
ical
iCal
\/
= link_to maps_url format: :json, tag: @lug.name do
= link_to maps_url tag: @lug.name do
%em.fa.fa-map-marker
geojson
OpenStreetMap
\/
= link_to maps_url format: :json, tag: @lug.name do
%em.fa.fa-dot-circle-o
GeoJSON
%dl
- if @lug.city.present?
......@@ -45,6 +53,7 @@
%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
......@@ -57,10 +66,7 @@
%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
%hr/
.date= display_date event
- if @events_past.any?
%h3=raw t 'past', count: @events_past.count
......@@ -74,7 +80,6 @@
%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
.date= display_date event
#map.events(data-url="#{maps_path format: :json, tag: @lug.name}")
......@@ -3,3 +3,16 @@
=title t '.title'
#map.events(data-url="#{maps_path format: :json}")
%nav
= link_to events_url format: :rss, tag: params[:tag] do
%em.fa.fa-rss
RSS
\/
= link_to events_url format: :ics, tag: params[:tag] do
%em.fa.fa-th-list
iCal
\/
= link_to maps_url format: :json, tag: params[:tag] do
%em.fa.fa-dot-circle-o
GeoJSON
......@@ -7,18 +7,20 @@
%table.list
%thead
%tr
%th=t :all, scope: 'activerecord.attributes.region.name_values'
%th= link_to t(:all, scope: 'activerecord.attributes.region.name_values'), root_path
%th= link_to 'RSS', events_path(format: :rss, region: :all)
%th= link_to :webcal, events_path(protocol: :webcal, format: :ics, region: :all, only_path: false)
%th= link_to :iCal, events_path(format: :ics, region: :all, only_path: false)
%th= link_to :GeoJSON, maps_path(format: :json, region: :all, only_path: false)
%tbody
- @regions.find_each do |region|
%tr
%td= region.name
%td= link_to region.name, events_path(region: region.id)
%td= link_to 'RSS', events_path(format: :rss, region: region.id)
%td= link_to :webcal, events_path(protocol: :webcal, format: :ics, region: region.id, only_path: false)
%td= link_to :iCal, events_path(format: :ics, region: region.id, only_path: false)
%td= link_to :GeoJSON, maps_path(format: :json, region: region.id, only_path: false)
:markdown
#{t '.help', tag: events_path(format: :rss, tag: 'toulibre', only_path: false), daylimit: events_path(format: :ics, daylimit: '42', only_path: false)}
......@@ -9,17 +9,25 @@
%em.fa.fa-arrow-left
= Event.human_attribute_name(:tag).pluralize
\/
= link_to events_url tag: params[:id] do
%em.fa.fa-calendar
Agenda
\/
= link_to events_url format: :rss, tag: params[:id] do
%em.fa.fa-rss
rss
RSS
\/
= link_to events_url format: :ics, tag: params[:id] do
%em.fa.fa-th-list
ical
iCal
\/
= link_to maps_url format: :json, tag: params[:id] do
= link_to maps_url tag: params[:id] do
%em.fa.fa-map-marker
geojson
OpenStreetMap
\/
= link_to maps_url format: :json, tag: params[:id] do
%em.fa.fa-dot-circle-o
GeoJSON
- if @events_future.any? || @events_past.any?
%fieldset
......@@ -31,29 +39,27 @@
%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
- 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
.date= 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
- 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
.date= display_date event
#map.events(data-url="#{maps_path format: :json, tag: params[:id]}")
......@@ -30,10 +30,10 @@ en:
belgique: Belgique
suisse: Suisse
propose: Propose an event
feeds: RSS/iCal feed
feeds: Feeds
map: Map
tags: Tags
infos: Informations
infos: Infos
stats: Statistics
contact: Contact
moderation: Moderation
......
......@@ -30,10 +30,10 @@ fr:
belgique: Belgique
suisse: Suisse
propose: Proposer un événement
feeds: Flux RSS/iCal
feeds: Flux
map: Carte
tags: Tags
infos: Informations
infos: Infos
stats: Statistiques
contact: Contact
moderation: Modération
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter