Listing future events, with full description. Refs #90

This commit is contained in:
echarp 2017-05-07 19:29:56 +02:00
parent f91226d6dc
commit 2d5b916077
2 changed files with 37 additions and 30 deletions

View File

@ -131,3 +131,11 @@ body.events.show, body.orgas.show, body.tags.show, body.pages
img img
margin-left: 1% margin-left: 1%
margin-right: 1% margin-right: 1%
/* Display in events list */
article.event
box-shadow: -1em 1em 1em -1em gray
margin-left: 1em
padding-left: 1em
padding-bottom: 0.4em
border-bottom-left-radius: 1em

View File

@ -33,35 +33,34 @@
%em.fa.fa-li.fa-dot-circle-o %em.fa.fa-li.fa-dot-circle-o
GeoJSON GeoJSON
- if @events_future.any? || @events_past.any? - @events_future.order('start_time asc').each do |event|
- if @events_future.any? %article.event
%h3 %h3
%em.fa.fa-forward %em.city= event.city
= t '.future' = event.title
%ul.fa-ul %p.full_address
- @events_future.order('start_time asc').each do |event| - if event.place_name.present?
%li %span= event.place_name
= link_to event do - if event.address.present?
- if event.locality? %span= event.address
%em.locality.fa-li.fa.fa-globe %p= display_date event
- else .description
%em.locality.fa-li.fa.fa-shield = description sanitize event.description,
%em.city= event.city tags: %w(p h1 h2 h3 h4 br table tr th td ul ol li a strong b em i img sub sup span),
= event.title attributes: %w(href src width height style title)
.date= display_date event
- if @events_past.any? - if @events_past.any?
%h3 %h2
%em.fa.fa-backward %em.fa.fa-backward
= t '.past' = t '.past'
%ul.fa-ul %ul.fa-ul
- @events_past.order('start_time desc').each do |event| - @events_past.order('start_time desc').each do |event|
%li %li
= link_to event do = link_to event do
- if event.locality? - if event.locality?
%em.locality.fa-li.fa.fa-globe %em.locality.fa-li.fa.fa-globe
- else - elsif event.tags.any? { |t| t.name.include? 'libre-en-fete' }
%em.locality.fa-li.fa.fa-shield = image_tag 'lef-small.png', alt: 'LEF', width: 16, height: 16
%em.city= event.city %em.city{ title: event.address }= event.city
= event.title = event.title
.date= display_date event .date= display_date event