From 7b1295884861b222e441f431089ea3a6d99fd569 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 10 Jan 2013 11:45:46 +0100 Subject: Started to fragment cache gs_parameter views. --- app/views/gs_parameters/index.html.haml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 753e64b..51957b6 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,15 +1,15 @@ - title t("gs_parameters.index.page_title") - if @gs_parameters && @gs_parameters.count > 0 - - if @sections - %table - - @sections.each do |section| - %tr - %td{:colspan => 3} - %h3= section - = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) - - else - %table - = render "index_core", :gs_parameters => @gs_parameters - -= render :partial => 'shared/create_link', :locals => {:child_class => GsParameter} \ No newline at end of file + - cache([@ps_parameters_unordered.order(:updated_at).last, @ps_parameters_unordered.pluck(:id)]) do + - if @sections + %table + - @sections.each do |section| + %tr + %td{:colspan => 3} + %h3= section + / Template Dependency: gs_parameters/index_core + = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) + - else + %table + = render "index_core", :gs_parameters => @gs_parameters -- cgit v1.2.3