Some small optimisation
This commit is contained in:
parent
aba7b8f8b1
commit
0e73eb6c41
@ -252,11 +252,11 @@ GEM
|
||||
ruby_parser (3.5.0)
|
||||
sexp_processor (~> 4.1)
|
||||
sass (3.2.19)
|
||||
sass-rails (4.0.3)
|
||||
sass-rails (4.0.2)
|
||||
railties (>= 4.0.0, < 5.0)
|
||||
sass (~> 3.2.0)
|
||||
sprockets (~> 2.8, <= 2.11.0)
|
||||
sprockets-rails (~> 2.0)
|
||||
sprockets-rails (~> 2.0.0)
|
||||
sdoc (0.4.1)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
rdoc (~> 4.0)
|
||||
@ -275,7 +275,7 @@ GEM
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-rails (2.1.3)
|
||||
sprockets-rails (2.0.1)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
sprockets (~> 2.8)
|
||||
|
@ -2,10 +2,10 @@
|
||||
class TagsController < InheritedResources::Base
|
||||
def index
|
||||
@tags = Event
|
||||
.pluck(:tags)
|
||||
.join(' ').split.group_by { |i| i }
|
||||
.reject { |_k, v| v.size < 2 }
|
||||
.pluck(:tags).map { |e| e.split }.flatten
|
||||
.group_by { |i| i }
|
||||
.map { |k, v| [k, v.size] }
|
||||
.reject { |_k, v| v < 2 }
|
||||
.sort
|
||||
|
||||
respond_to do |format|
|
||||
|
@ -1,7 +1,7 @@
|
||||
-# Seems necessary, for the time being, to ensure calendar is changing days correctly
|
||||
- Time.zone = 'Paris'
|
||||
|
||||
%nav.region_selector= render '/regions/selector'
|
||||
= render '/regions/selector'
|
||||
|
||||
= render '/lugs/search'
|
||||
|
||||
|
@ -1,24 +1,25 @@
|
||||
-# Display the currently selected region
|
||||
%h3
|
||||
- if params[:region]
|
||||
= Region.find params[:region]
|
||||
%em.fa.fa-chevron-down
|
||||
- else
|
||||
%span.placeholder
|
||||
=t '.all_regions'
|
||||
%nav.region_selector
|
||||
-# Display the currently selected region
|
||||
%h3
|
||||
- if params[:region]
|
||||
= Region.find params[:region]
|
||||
%em.fa.fa-chevron-down
|
||||
- else
|
||||
%span.placeholder
|
||||
=t '.all_regions'
|
||||
%em.fa.fa-chevron-down
|
||||
|
||||
-# Choose a region to filter events with
|
||||
%ul
|
||||
%li
|
||||
= link_to t('.all_regions'), region: nil,
|
||||
start_date: params[:start_date],
|
||||
year: params[:year],
|
||||
tag: params[:tag]
|
||||
|
||||
- Region.all.each do |region|
|
||||
-# Choose a region to filter events with
|
||||
%ul
|
||||
%li
|
||||
= link_to region, region: region.id,
|
||||
= link_to t('.all_regions'), region: nil,
|
||||
start_date: params[:start_date],
|
||||
year: params[:year],
|
||||
tag: params[:tag]
|
||||
|
||||
- Region.all.each do |region|
|
||||
%li
|
||||
= link_to region, region: region.id,
|
||||
start_date: params[:start_date],
|
||||
year: params[:year],
|
||||
tag: params[:tag]
|
||||
|
@ -10,4 +10,4 @@
|
||||
\/
|
||||
= link_to :ical, events_url(format: :ics, tag: tag[0])
|
||||
|
||||
%p Seuls les tags portants sur plus d'un évènement sont affichés dans cette liste.
|
||||
%p=t '.limited'
|
||||
|
@ -198,6 +198,7 @@ Exemple: `%{daylimit}`"
|
||||
tags:
|
||||
index:
|
||||
title: Tags
|
||||
limited: Seuls les tags portants sur plus d'un évènement sont affichés dans cette liste.
|
||||
show:
|
||||
title: Les événements
|
||||
future:
|
||||
|
Loading…
Reference in New Issue
Block a user