Event counts are added to the tags' pages

This commit is contained in:
echarp 2018-09-03 23:55:52 +02:00
parent a9c5d6bc55
commit 61529e4ecf
4 changed files with 28 additions and 3 deletions

View File

@ -1,7 +1,15 @@
%h2 %h2
%em.fa.fa-tag %em.fa.fa-tag
= title t '.title'
\-
= title params[:id] = title params[:id]
%h2
%em.fa.fa-forward
= t '.future'
\-
= t '.count', count: @events_future.count
%aside %aside
%h1 %h1
%em.fa.fa-link %em.fa.fa-link
@ -46,14 +54,16 @@
%span= event.address %span= event.address
%p= display_date event %p= display_date event
.description .description
= description sanitize event.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), 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) attributes: %w[href src width height style title]
- if @events_past.any? - if @events_past.any?
%h2 %h2
%em.fa.fa-backward %em.fa.fa-backward
= t '.past' = t '.past'
\-
= t '.count', count: @events_past.count
%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

View File

@ -151,9 +151,14 @@ it more readable or agreable."
index: index:
title: Tags title: Tags
show: show:
title: Tag
links: See also links: See also
future: Future future: Future
past: Past past: Past
count:
zero:
one: one event
other: "%{count} events"
moderations: moderations:
index: index:
title: Events to moderate title: Events to moderate

View File

@ -165,9 +165,14 @@ lévènement pour la rendre plus complète, plus lisible ou plus attrayante."
index: index:
title: Mots-clés title: Mots-clés
show: show:
title: Mot-clé
links: Voir aussi links: Voir aussi
future: Prochainement future: Prochainement
past: Dans le passé past: Dans le passé
count:
zero:
one: Un événement
other: "%{count} événements"
moderations: moderations:
index: index:
title: Événements à modérer title: Événements à modérer

View File

@ -152,9 +152,14 @@ completa, deixando o texto mais legível e agradável.
index: index:
title: Tags title: Tags
show: show:
title: Tag
links: Veja também links: Veja também
future: Futuro future: Futuro
past: Passado past: Passado
count:
zero:
one: um evento
other: "%{count} eventos"
moderations: moderations:
index: index:
title: Eventos para moderar title: Eventos para moderar