From 9788c420cf01ae6e7d302f67e93ba0739e0de402 Mon Sep 17 00:00:00 2001 From: echarp Date: Sat, 16 Aug 2014 22:34:29 +0200 Subject: [PATCH] =?UTF-8?q?Essais=20de=20cache=20pour=20acc=C3=A9l=C3=A9re?= =?UTF-8?q?r=20encore=20la=20page=20principale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/events/index.html.haml | 36 +++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index 70f9d280..80710d9b 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -1,9 +1,10 @@ -# Seems necessary, for the time being, to ensure calendar is changing days correctly - Time.zone = 'Paris' -= render '/regions/selector' +- cache do + = render '/regions/selector' -= render '/lugs/search' + = render '/lugs/search' - if params[:year] -# Whole year calendar @@ -46,21 +47,22 @@ %strong.city= event.city.gsub '-', ' ' = event.title -.formats - %em.fa.fa-rss - =raw t '.calendar_in', - rss: link_to('RSS', events_url(:rss, - tag: params[:tag], region: params[:region])), - webcal: link_to('webcal', events_url(:rss, - tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])), - ical: link_to('iCal', events_url(:rss, - tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region])) +- cache do + .formats + %em.fa.fa-rss + =raw t '.calendar_in', + rss: link_to('RSS', events_url(:rss, + tag: params[:tag], region: params[:region])), + webcal: link_to('webcal', events_url(:rss, + tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])), + ical: link_to('iCal', events_url(:rss, + tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region])) -%a#banner(href='http://april.org/campagne') - -#%img(src='http://www.april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april.png' - width='580' height='76' alt='Priorité au Logiciel Libre! Je soutiens l\'April.') - = image_tag 'priorite-logiciel-libre-je-soutiens-april_2_m.png', - width: '374', height: '48', - alt: 'Priorité au Logiciel Libre! Je soutiens l\'April.' + %a#banner(href='http://april.org/campagne') + -#%img(src='http://www.april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april.png' + width='580' height='76' alt='Priorité au Logiciel Libre! Je soutiens l\'April.') + = image_tag 'priorite-logiciel-libre-je-soutiens-april_2_m.png', + width: '374', height: '48', + alt: 'Priorité au Logiciel Libre! Je soutiens l\'April.' - set_events_meta