Tags page better displayed

This commit is contained in:
echarp 2016-10-18 15:37:03 +02:00
parent e4797e474b
commit aaaeb323bc
16 changed files with 75955 additions and 89 deletions

View File

@ -145,7 +145,9 @@ aside
width: 16em
border: 1px solid #96CFFF
margin: 0 1.2em
z-index: 10
padding: 5px
position: relative
font-size: 0.7em
box-shadow: 4px 4px 1em gray
margin-right: -4em

View File

@ -108,7 +108,8 @@ a#banner
margin-left: 5%
padding-left: 2px
body.events.show main, body.orgas.show main
body.events.show, body.orgas.show, body.tags.show
main
padding: 1em
max-width: 60em
box-shadow: 1px 1px 5px gray

View File

@ -2,9 +2,8 @@
%em.fa.fa-map-marker
= title t '.title'
- if params[:tag]
«
%em.fa.fa-tag
%em= params[:tag]
»
%ul.list#map
%li
@ -12,13 +11,12 @@
.awesome-marker.awesome-marker-icon-blue
%i.icon-white.fa.fa-calendar
= Event.model_name.human
- markerColors = ['blue', 'red', 'darkred', 'orange', 'green', 'darkgreen',
'purple', 'darkpuple', 'cadetblue']
- cs = %w(blue red darkred orange green darkgreen purple darkpuple cadetblue)
- idx = 1
- Kind.all.each do |kind|
%li
= link_to map_path kind.name, format: :json do
.awesome-marker{ class: "awesome-marker-icon-#{markerColors[idx % markerColors.length]}" }
.awesome-marker{ class: "awesome-marker-icon-#{cs[idx % cs.length]}" }
%i.icon-white.fa{ class: "fa-#{kind.icon}" }
= Kind.human_attribute_name("name_#{kind.name}")
- idx += 1

View File

@ -4,11 +4,10 @@
%em.fa{ class: "fa-#{@kind.icon}" }
= Kind.human_attribute_name("name_#{@kind.name}")
- if params[:tag]
«
%em.fa.fa-tag
%em= params[:tag]
»
%ul#map.list
%ul.list#map
%li
= link_to map_path @kind.name, format: :json do
%em.fa{ class: "fa-#{@kind.icon}" }

View File

@ -23,22 +23,18 @@
= link_to events_path tag: @orga.name_as_tag do
%em.fa.fa-li.fa-calendar
Agenda
%li
= link_to events_path format: :rss, tag: @orga.name_as_tag do
%em.fa.fa-li.fa-rss
RSS
%li
= link_to events_path format: :ics, tag: @orga.name_as_tag do
%em.fa.fa-li.fa-th-list
iCal
%li
= link_to maps_path tag: @orga.name_as_tag do
%em.fa.fa-li.fa-map-marker
OpenStreetMap
%li
= link_to maps_path format: :json, tag: @orga.name_as_tag do
%em.fa.fa-li.fa-dot-circle-o

View File

@ -1,65 +1,63 @@
%h2
= t '.title'
«
%em= params[:id]
»
%em.fa.fa-tag
%em= title params[:id]
%nav
%aside
%h1
%em.fa.fa-link
= t '.links'
%ul.fa-ul
%li
= link_to tags_path, class: :back do
%em.fa.fa-arrow-left
= Event.human_attribute_name(:tag).pluralize
\/
%em.fa.fa-li.fa-arrow-left
= Event.human_attribute_name :tags
%li
= link_to events_path tag: params[:id] do
%em.fa.fa-calendar
%em.fa.fa-li.fa-calendar
Agenda
\/
%li
= link_to events_path format: :rss, tag: params[:id] do
%em.fa.fa-rss
%em.fa.fa-li.fa-rss
RSS
\/
%li
= link_to events_path format: :ics, tag: params[:id] do
%em.fa.fa-th-list
%em.fa.fa-li.fa-th-list
iCal
\/
%li
= link_to maps_path tag: params[:id] do
%em.fa.fa-map-marker
%em.fa.fa-li.fa-map-marker
OpenStreetMap
\/
%li
= link_to maps_path format: :json, tag: params[:id] do
%em.fa.fa-dot-circle-o
%em.fa.fa-li.fa-dot-circle-o
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
%h3= raw t '.future'
%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'}")
%em.locality.fa-li.fa.fa-globe
- else
%em.locality.fa-li.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
%em.locality.fa-li.fa.fa-shield
%em.city= event.city
= event.title
.date= display_date event
- if @events_past.any?
%h3=raw t 'past', count: @events_past.count
%h3= raw t '.past'
%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'}")
%em.locality.fa-li.fa.fa-globe
- else
%em.locality.fa-li.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
%em.locality.fa-li.fa.fa-shield
%em.city= event.city
= event.title
.date= display_date event
#map.events(data-url="#{maps_path format: :json, tag: params[:id]}")

View File

@ -155,7 +155,9 @@ it more readable or agreable.
title: Tags
limited: Only tags on more than three events are displayed in this list
show:
title: Events
links: See also
future: Future
past: Past
moderations:
index:
title: Events to moderate
@ -246,7 +248,7 @@ description."
title: Organisations
new: Add an organisation
show:
links: Links
links: See also
actions: Actions
edit: Edit
cancel: Delete

View File

@ -152,7 +152,9 @@ fr:
limited: Seuls les mots-clés portants sur plus de trois évènements sont
affichés dans cette liste
show:
title: Les événements
links: Voir aussi
future: Prochainement
past: Dans le passé
moderations:
index:
title: Événements à modérer
@ -247,7 +249,7 @@ description plus complète."
title: Organisations
new: Ajouter une organisation
show:
links: Liens
links: Voir aussi
actions: Actions
edit: Éditer
cancel: Supprimer

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,21 @@
(function() {
$(document).on('turbolinks:load', function() {
return tinyMCE.init({
schema: 'html5',
menubar: false,
language: 'fr_FR',
selector: 'textarea.description',
content_css: '/assets/application-2206cdbaf19b5e0a020de5739e2c911351d6bdd80a0dac961f79729f718ae851.css',
entity_encoding: 'raw',
add_unload_trigger: true,
browser_spellcheck: true,
toolbar: [' bold italic strikethrough | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | link image media insertdatetime charmap table | undo redo | searchreplace | code visualblocks preview fullscreen'],
plugins: 'lists, advlist, autolink, link, image, charmap, paste, print, preview, table, fullscreen, searchreplace, media, insertdatetime, visualblocks, visualchars, wordcount, contextmenu, code'
});
});
$(document).on('turbolinks:before-cache', function() {
return tinymce.remove();
});
}).call(this);