diff --git a/app/assets/stylesheets/events.css.sass b/app/assets/stylesheets/events.css.sass index 01e88131..009d006b 100644 --- a/app/assets/stylesheets/events.css.sass +++ b/app/assets/stylesheets/events.css.sass @@ -46,10 +46,6 @@ body.events.index table overflow: hidden white-space: nowrap text-overflow: ellipsis - em.fa - width: auto - position: static - margin-right: 0.7em &.today border: 1px solid #FFB578 background-color: #FFE0C7 @@ -89,12 +85,9 @@ body.events.index table margin: 0 padding: 0 margin-top: 0.4em - em.fa-li + em.fa.fa-globe font-size: smaller - &.fa-globe - color: red - em.fa-li:before - margin-right: -1em + color: red .event padding-left: 0.2em diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index 7195c59f..d8614ca7 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -5,9 +5,11 @@ -# Whole year calendar - @events = @events.year params[:year].to_i %header.calendar-header.year - = link_to '<<', year: params[:year].to_i-1, tag: params[:tag], region: params[:region] + = link_to '<<', year: params[:year].to_i - 1, tag: params[:tag], + region: params[:region] = params[:year] - = link_to '>>', year: params[:year].to_i+1, tag: params[:tag], region: params[:region] + = link_to '>>', year: params[:year].to_i + 1, tag: params[:tag], + region: params[:region] - (1..12).each do |i| - params[:start_date] = "#{params[:year]}-#{i}-01" @@ -15,16 +17,17 @@ = month_calendar day_names: 'date.day_names', events: @events, previous_link: nil, next_link: nil, title: ->(start_date) { raw link_to l(start_date, format: :month), - root_path(start_date: start_date), class: 'month_selector' } do |date, events| + root_path(start_date: start_date), + class: 'month_selector' } do |date, events| .day_number= date.day %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(title="#{display_date(event)}") + %li.event{ title: display_date(event) } - if event.locality? - %em.locality.fa.fa-li.fa-globe + %em.locality.fa.fa-globe = link_to event do - %strong.city(title="#{event.address}")= event.city + %strong.city{ title: event.address }= event.city = event.title - else @@ -34,32 +37,36 @@ title: ->(start_date) { raw "#{I18n.t('date.month_names')[start_date.month]} #{link_to start_date.year, root_path(year: start_date.year)}" }, previous_link: ->(param, date_range) { link_to '<<', - { param => (date_range.first - 1.day).beginning_of_month, tag: params[:tag], region: params[:region] } }, + { param => (date_range.first - 1.day).beginning_of_month, + tag: params[:tag], region: params[:region] } }, next_link: ->(param, date_range) { link_to '>>', - { param => (date_range.last + 1.day).beginning_of_month, tag: params[:tag], region: params[:region] } } do |date, events| + { param => (date_range.last + 1.day).beginning_of_month, + tag: params[:tag], region: params[:region] } } do |date, events| .day_number= date.day %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(title="#{display_date(event)}") + %li.event{ title: display_date(event) } - if event.locality? - %em.locality.fa.fa-li.fa-globe + %em.locality.fa.fa-globe = link_to event do - %strong.city(title="#{event.address}")= event.city + %strong.city{ title: event.address }= event.city = event.title .formats %em.fa.fa-rss - =raw t '.calendar_in', + = raw t '.calendar_in', rss: link_to('RSS', events_path(:rss, tag: params[:tag], region: params[:region])), webcal: link_to('webcal', events_path(:rss, - tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])), + tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], + region: params[:region])), ical: link_to('iCal', events_path(:rss, - tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region])) + tag: params[:tag], format: :ics, tag: params[:tag], + region: params[:region])) %a#banner(href='http://april.org/campagne') - -#%img(src='http://www.april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april.png' + -# %img(src='http://www.april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april.png' width='580' height='76' alt='Priorité au Logiciel Libre! Je soutiens l\'April.') = image_tag 'priorite-logiciel-libre-je-soutiens-april_2_m.png', width: '374', height: '48',