Event's meta data presented as a dictionnary list

This commit is contained in:
echarp 2020-01-04 12:42:37 +01:00
parent 25f7f1cc0c
commit 8ab5b615d9
6 changed files with 41 additions and 36 deletions

View File

@ -24,13 +24,11 @@ table
text-align: center
dl
width: 40em
margin: 1em auto
dt
clear: left
float: left
padding: 0.2em 1em
min-width: 50%
min-width: 12em
text-align: right
dd
padding: 0.2em 1em
@ -39,8 +37,6 @@ dl
padding-right: 16em
h3
display: inline
dt + dd + dt +dd
border-top: 1px solid #999
ul.counters
text-align: center

View File

@ -1,5 +1,12 @@
body.stats h3
body.stats
h3
text-align: center
dl
width: 40em
dt
min-width: 50%
dt + dd + dt +dd
border-top: 1px solid #999
table.list.dates
width: 100%

View File

@ -5,4 +5,4 @@
%strong.city{ title: event.address }= event.city
= event.title
- if event.repeat&.positive?
%em.fa.fa-repeat{ title: event.schedule }
%em.fa.fa-redo-alt{ title: event.schedule }

View File

@ -33,7 +33,7 @@
%em
= t '.noMap'
%a{ target: '_blank',
href: 'https://osm.org/search?query=' + @event.full_address }
href: "https://osm.org/search?query=#{@event.full_address}" }
= image_tag 'osm_logo.svg', alt: 'OSM logo', width: '32px'
.description
@ -44,29 +44,32 @@
%h3
%em.fa.fa-info-circle
= t '.infos'
- if @event.url.present?
%p
%dl
- if @event.url.present?
%dt.url
%em.fa.fa-external-link-alt
%span.label= Event.human_attribute_name :url
= Event.human_attribute_name :url
%dd
= link_to @event.url, @event.url
- if @event.contact.present?
%p
- if @event.contact.present?
%dt.contact
%em.fa.fa-envelope
%span.label= Event.human_attribute_name :contact
= Event.human_attribute_name :contact
%dd
= mail_to @event.contact, nil,
encode: (request.format == 'text/html' ? :javascript : nil),
replace_at: ' CHEZ ', replace_dot: ' POINT '
- if @event.tags&.present?
%p.tags
- if @event.tags&.any?
%dt.tags
%em.fa.fa-tags
%span.label= Event.human_attribute_name :tags
= Event.human_attribute_name :tags
%dd
- @event.tags.each do |tag|
= link_to tag, tag_path(tag.name), rel: :tag
- if @event.repeat&.positive? && @event.rule
%h3
%em.fa.fa-repeat
%em.fa.fa-redo-alt
= @event.schedule
- if @event.moderated?

View File

@ -28,7 +28,7 @@
- if @event.repeat.positive?
%fieldset
%legend
%em.fa.fa-repeat
%em.fa.fa-redo-alt
= Event.human_attribute_name :repeat
%h3= t '.repeat_helper', count: @event.repeat

View File

@ -29,11 +29,10 @@
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]
%dl
%dd
%h3
%h3
%em.fa.fa-info-circle
= t '.infos'
%dl
- if @orga.department.present?
%dt.department
%em.fa.fa-puzzle-piece
@ -61,7 +60,7 @@
%dd= mail_to @orga.contact, nil,
encode: (request.format == 'text/html' ? :javascript : nil),
replace_at: ' CHEZ ', replace_dot: ' POINT '
- if @orga.tags.any?
- if @orga.tags&.any?
%dt.tags
%em.fa.fa-tags
= Event.human_attribute_name :tags
@ -78,7 +77,7 @@
= Orga.human_attribute_name :updated_at
%dd= l @orga.updated_at.to_date, format: :long
- if @events_future && @events_future.any?
- if @events_future&.any?
%dt.future
%em.fa.fa-forward
= t '.future'