From 57776d8aede3769dabd886d99ffb6bad2fd6eba0 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 16 Jan 2013 11:53:17 +0100 Subject: Added a cache for the top nav and the footer. --- app/views/layouts/application.html.haml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index c1a56f2..a2afbf8 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -3,8 +3,7 @@ -%html.no-js{ :lang => "en" } - ~#OPTIMIZE Make html lang attribute reflect the actual language. +%html.no-js{ :lang => I18n.locale.to_s } %header %meta{ :charset => "utf-8" }/ @@ -19,7 +18,8 @@ %body #container - = render :partial => "shared/header" + - cache(['application_header', I18n.locale, current_user]) do + = render :partial => "shared/header" = render :partial => "shared/flash", :locals => { :flash => flash} #content{:role => 'main'} @@ -30,18 +30,19 @@ %h1= yield(:title) = yield - %footer#main - %ul - %li - %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} - - if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user) + - cache(['application_footer', I18n.locale]) do + %footer#main + %ul %li - %a{:href => "http://amooma.de"} Kommerzieller Support und Consulting - - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user) - %li - %a{:href => "https://groups.google.com/group/gs5-users/"} Kostenlose Mailingliste + %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} + - if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user) + %li + %a{:href => "http://amooma.de"} Kommerzieller Support und Consulting + - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user) + %li + %a{:href => "https://groups.google.com/group/gs5-users/"} Kostenlose Mailingliste - .amooma-logo - %span brought to you by - %a{ :target => '_blank', :href => "http://amooma.de/" } Amooma + .amooma-logo + %span brought to you by + %a{ :target => '_blank', :href => "http://amooma.de/" } Amooma -- cgit v1.2.3