diff --git a/app/assets/stylesheets/events.css.sass b/app/assets/stylesheets/events.css.sass index 9adefdaa..4b7e09a4 100644 --- a/app/assets/stylesheets/events.css.sass +++ b/app/assets/stylesheets/events.css.sass @@ -10,6 +10,9 @@ header.calendar-header &:first-child, &:last-child margin: 0 0.3em +em.locality.fa + color: gray + span.city:after, strong.city:after, em.city:after content: ':' @@ -77,14 +80,13 @@ body.events.index table margin-left: 0 padding-left: 0.8em margin-bottom: 5px - list-style-type: none li color: #444 margin: 0 padding: 0 margin-top: 0.4em - em.fa - color: gray + &.national + border-bottom: solid 3px lightgray em.fa-li font-size: smaller em.fa-li:before diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index 749c3eb9..2cb77ac8 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -39,13 +39,13 @@ %ul.events.fa-ul - events.select { |e| (e.start_time.to_date..e.end_time.to_date).cover? date } - .sort_by { |e| e.city }.each do |event| - %li.event + %li.event(class="#{event.locality? ? 'national' : 'local'}" title="#{display_date(event)}") - if event.locality? - %em.fa.fa-li.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}") + %em.locality.fa.fa-li.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}") - else - %em.fa.fa-li.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}") + %em.locality.fa.fa-li.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}") = link_to event do - %strong.city= event.city + %strong.city(title="#{event.full_address}")= event.city = event.title .formats diff --git a/app/views/events/show.html.haml b/app/views/events/show.html.haml index 87d37942..e47d752d 100644 --- a/app/views/events/show.html.haml +++ b/app/views/events/show.html.haml @@ -1,7 +1,11 @@ - set_event_meta %h2 - %em.city= @event.city + - 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(title="#{@event.full_address}")= @event.city = title @event.title - if @event.persisted? && request.format == 'text/html' && controller.controller_name == 'events' && controller.action_name == 'show' diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index efc5ee0e..5e9722ae 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -4,7 +4,8 @@ %head = display_meta_tags site: t('.title') - %meta(http-equiv='Content-Type' content='text/html; charset=utf-8') + %meta(http-equiv='Content-Type' content='text/html') + %meta(charset='utf-8') %meta(name='viewport' content='width=device-width, initial-scale=1.0') %meta(name='robots' content='index, follow') diff --git a/config/locales/models/fr.yml b/config/locales/models/fr.yml index e7f91dc1..18580e32 100644 --- a/config/locales/models/fr.yml +++ b/config/locales/models/fr.yml @@ -33,10 +33,10 @@ fr: inseecode: Code INSEE regioncode: Code région lug: - related_region: Région - department: Département - url: Adresse web city: Ville + department: Département + region: Région + url: Adresse web event: title: Titre start_time: Début @@ -44,7 +44,7 @@ fr: description: Description address: Adresse city: Ville - related_region: Région + region: Région locality: Portée url: URL contact: Contact