Removing the "libre en fête" flower from the main agenda display, to accelerate display

This commit is contained in:
echarp 2019-04-19 14:05:07 +02:00
parent ab915b0c56
commit a14b32075e
3 changed files with 1 additions and 5 deletions

View File

@ -3,8 +3,7 @@ module EventsHelper
def set_events_meta def set_events_meta
set_meta_tags \ set_meta_tags \
description: t('layouts.application.subtitle'), description: t('layouts.application.subtitle'),
keywords: @events.map(&:tags).join(', ').split.group_by { |i| i } keywords: params[:tag],
.reject { |_k, v| v.size < 2 }.map { |k, _v| k },
DC: { DC: {
title: t('layouts.application.title'), title: t('layouts.application.title'),
subject: t('layouts.application.subtitle'), subject: t('layouts.application.subtitle'),

View File

@ -56,7 +56,6 @@ class Event < ApplicationRecord
where '? <= end_time and start_time <= ?', where '? <= end_time and start_time <= ?',
start_date.to_date.beginning_of_month.beginning_of_week, start_date.to_date.beginning_of_month.beginning_of_week,
start_date.to_date.end_of_month.end_of_week.end_of_day start_date.to_date.end_of_month.end_of_week.end_of_day
includes :tags
end) end)
scope :period, (lambda do |year, week| scope :period, (lambda do |year, week|
start_date = Date.commercial(year.to_i, week.to_i) start_date = Date.commercial(year.to_i, week.to_i)

View File

@ -1,8 +1,6 @@
%li.event{ title: display_date(event) } %li.event{ title: display_date(event) }
- if event.locality? - if event.locality?
%em.locality.fa.fa-globe %em.locality.fa.fa-globe
- if event.tags.any? { |t| t.name.include? 'libre-en-fete' }
= image_tag 'lef-small.png', alt: 'LEF', width: 16, height: 16
= link_to event do = link_to event do
%strong.city{ title: event.address }= event.city %strong.city{ title: event.address }= event.city
= event.title = event.title