Essaie d'optimisations
This commit is contained in:
parent
0d72422826
commit
cce660843d
@ -9,10 +9,9 @@ header.calendar-header
|
||||
&:first-child, &:last-child
|
||||
margin: 0 0.3em
|
||||
|
||||
.events, .event
|
||||
.city:after
|
||||
content: ':'
|
||||
margin-right: -1px
|
||||
.city:after
|
||||
content: ':'
|
||||
margin-right: -1px
|
||||
|
||||
body.events.index table
|
||||
width: 90%
|
||||
|
@ -5,7 +5,7 @@ X-WR-CALNAME:Agenda du Libre
|
||||
X-WR-TIMEZONE:Europe/Paris
|
||||
CALSCALE:GREGORIAN
|
||||
X-WR-CALDESC:<%= t 'title', scope: [:layouts, :application] %>
|
||||
<% @events.each do |event| %>
|
||||
<% @events.find_each do |event| %>
|
||||
BEGIN:VEVENT
|
||||
DTSTART;TZID=Europe/Paris:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
|
||||
DTEND;TZID=Europe/Paris:<%= event.end_time.strftime '%Y%m%dT%H%M%S' %>
|
||||
|
@ -1,7 +1,7 @@
|
||||
xml.instruct!
|
||||
|
||||
xml.events do
|
||||
@events.each do |event|
|
||||
@events.find_each do |event|
|
||||
xml.event do
|
||||
xml.title event.title
|
||||
xml.start_time event.start_time.strftime '%Y/%m/%d %T'
|
||||
|
@ -17,9 +17,9 @@
|
||||
year: params[:year],
|
||||
tag: params[:tag]
|
||||
|
||||
- Region.all.each do |region|
|
||||
- Region.pluck(:id, :name).each do |id, name|
|
||||
%li
|
||||
= link_to region, region: region.id,
|
||||
= link_to name, region: id,
|
||||
start_date: params[:start_date],
|
||||
year: params[:year],
|
||||
tag: params[:tag]
|
||||
|
@ -13,7 +13,7 @@
|
||||
%th= link_to :iCal, events_path(format: :ics, region: :all, only_path: false)
|
||||
|
||||
%tbody
|
||||
- @regions.each do |region|
|
||||
- @regions.find_each do |region|
|
||||
%tr
|
||||
%td= region.name
|
||||
%td= link_to 'RSS', events_path(format: :rss, region: region.id)
|
||||
|
@ -4,9 +4,12 @@
|
||||
|
||||
%p=raw t '.future', count: @events_future.count
|
||||
%ul
|
||||
- @events_future.each do |event|
|
||||
- @events_future.find_each do |event|
|
||||
%li
|
||||
%div= link_to event.title, event
|
||||
%div
|
||||
= link_to event do
|
||||
%em.city= event.city
|
||||
= event.title
|
||||
- if event.same_day?
|
||||
le
|
||||
=l event.start_time.to_date, format: :long
|
||||
@ -15,14 +18,15 @@
|
||||
=l event.start_time.to_date, format: :long
|
||||
au
|
||||
=l event.end_time.to_date, format: :long
|
||||
à
|
||||
= event.city
|
||||
|
||||
%p=raw t '.past', count: @events_past.count
|
||||
%ul
|
||||
- @events_past.each do |event|
|
||||
- @events_past.find_each do |event|
|
||||
%li
|
||||
%div= link_to event.title, event
|
||||
%div
|
||||
= link_to event do
|
||||
%em.city= event.city
|
||||
= event.title
|
||||
- if event.same_day?
|
||||
le
|
||||
=l event.start_time.to_date, format: :long
|
||||
@ -31,5 +35,3 @@
|
||||
=l event.start_time.to_date, format: :long
|
||||
au
|
||||
=l event.end_time.to_date, format: :long
|
||||
à
|
||||
= event.city
|
||||
|
Loading…
Reference in New Issue
Block a user