From 9254bd972554550d7bed22de39cedff73a159c36 Mon Sep 17 00:00:00 2001 From: Britt Mileshosky Date: Thu, 26 Jun 2014 12:44:52 -0500 Subject: [PATCH] Removed improper caching from networks/_alphabetized_list partials. Also adjusted the width of the header for aesthetics on networks list pages --- app/assets/stylesheets/application.scss | 4 ++++ .../networks/_alphabetized_list.html.haml | 24 +++++++++---------- app/views/networks/_navigation.html.haml | 4 ++-- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 06f2f036..6e805d32 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -211,6 +211,10 @@ h4 { } } +.networks-header { + width: auto; +} + .secondary-notice { @include secondary-notice; } diff --git a/app/views/networks/_alphabetized_list.html.haml b/app/views/networks/_alphabetized_list.html.haml index 71005bca..820bead7 100644 --- a/app/views/networks/_alphabetized_list.html.haml +++ b/app/views/networks/_alphabetized_list.html.haml @@ -1,13 +1,11 @@ - --cache ['v4', 'network_list', networks_list.count, params[:sort] || "unsorted", is_admin?, user.try(:id)], :expires_in => 1.day do - - networks = networks_list.sort_by(&:name) - - unless networks.blank? - - current_char = networks.first.name[0] - - alpha_networks = [] - - networks.each do |network| - - if current_char != network.name[0] - = render :partial => "alpha_network", :locals => {:alphabet => current_char, :networks => alpha_networks} - - alpha_networks = [] - - alpha_networks << network - - current_char = network.name[0] - = render :partial => "alpha_network", :locals => {:alphabet => current_char, :networks => alpha_networks} +- networks = networks_list.sort_by(&:name) +- unless networks.blank? + - current_char = networks.first.name[0] + - alpha_networks = [] + - networks.each do |network| + - if current_char != network.name[0] + = render :partial => "alpha_network", :locals => {:alphabet => current_char, :networks => alpha_networks} + - alpha_networks = [] + - alpha_networks << network + - current_char = network.name[0] + = render :partial => "alpha_network", :locals => {:alphabet => current_char, :networks => alpha_networks} diff --git a/app/views/networks/_navigation.html.haml b/app/views/networks/_navigation.html.haml index a0da6a36..0c04c159 100644 --- a/app/views/networks/_navigation.html.haml +++ b/app/views/networks/_navigation.html.haml @@ -1,4 +1,4 @@ -%header.cf.second-level-header +%header.cf.second-level-header.networks-header -#%input.network-search(type='text' value='search networks') / %h1 - unless network.nil? @@ -18,4 +18,4 @@ My networks -#%li -# %a{:href => featured_networks_path, :class => networks_nav_class(:featured)} - -# Featured \ No newline at end of file + -# Featured