Browse Source

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

remotes/origin/master
echarp 3 years ago
parent
commit
a14b32075e
  1. 3
      app/helpers/events_helper.rb
  2. 1
      app/models/event.rb
  3. 2
      app/views/events/_event.haml

3
app/helpers/events_helper.rb

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

1
app/models/event.rb

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

2
app/views/events/_event.haml

@ -1,8 +1,6 @@
%li.event{ title: display_date(event) }
- if event.locality?
%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
%strong.city{ title: event.address }= event.city
= event.title

Loading…
Cancel
Save