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,25 +33,24 @@
%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?
- if @events_future.any?
%h3
%em.fa.fa-forward
= t '.future'
%ul.fa-ul
- @events_future.order('start_time asc').each do |event| - @events_future.order('start_time asc').each do |event|
%li %article.event
= link_to event do %h3
- if event.locality?
%em.locality.fa-li.fa.fa-globe
- else
%em.locality.fa-li.fa.fa-shield
%em.city= event.city %em.city= event.city
= event.title = event.title
.date= display_date event %p.full_address
- if event.place_name.present?
%span= event.place_name
- if event.address.present?
%span= event.address
%p= display_date event
.description
= description sanitize event.description,
tags: %w(p h1 h2 h3 h4 br table tr th td ul ol li a strong b em i img sub sup span),
attributes: %w(href src width height style title)
- 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
@ -60,8 +59,8 @@
= 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