diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-06-11 16:14:55 -0700 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-06-11 16:14:55 -0700 |
commit | b1b5f97cd5d84698d10841c977431756e975b216 (patch) | |
tree | c2b430c3e26093b690d37c07d16aa6e09ce2c428 | |
parent | 5edbf3bc1660a2fd4d66ee1aec41c316a653142a (diff) | |
parent | b899d542efe424be83cf512c61e8cc0c5e3f0b1a (diff) |
Merge commit '0.11.0.8' into rails-3-develop
-rw-r--r-- | app/controllers/application_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/user_controller.rb | 1 | ||||
-rw-r--r-- | app/views/layouts/default.html.erb | 6 |
3 files changed, 4 insertions, 7 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index dffc16b63..c9ad48693 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -27,7 +27,6 @@ class ApplicationController < ActionController::Base before_filter :check_in_post_redirect before_filter :session_remember_me before_filter :set_vary_header - before_filter :set_popup_banner def set_vary_header response.headers['Vary'] = 'Cookie' @@ -543,9 +542,6 @@ class ApplicationController < ActionController::Base return country end - def set_popup_banner - @popup_banner = render_to_string(:partial => "general/popup_banner").strip.html_safe - end # URL generating functions are needed by all controllers (for redirects), # views (for links) and mailers (for use in emails), so include them into # all of all. diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 1ccab3003..1bf5a5316 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -536,6 +536,7 @@ class UserController < ApplicationController # actual profile photo of a user def get_profile_photo + long_cache @display_user = User.find(:first, :conditions => [ "url_name = ? and email_confirmed = ?", params[:url_name], true ]) if !@display_user raise ActiveRecord::RecordNotFound.new("user not found, url_name=" + params[:url_name]) diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index 023a93138..32ea5e4ff 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -67,11 +67,11 @@ <% if is_admin? %> <%= render :partial => 'admin_general/admin_navbar' %> <% end %> - -<% if !@popup_banner.blank? %> +<% popup_banner = render(:partial => "general/popup_banner").strip %> +<% if popup_banner.present? %> <div id="everypage" class="jshide"> <p class="popup-close"><a href="#top" onclick="$.cookie('seen_foi2', 1, { expires: 7, path: '/' }); $('#everypage').hide('slow'); return false;"><%= _('Close') %></a></p> - <%= @popup_banner %> + <%= raw popup_banner %> <p class="popup-close"><a href="#top" onclick="$.cookie('seen_foi2', 1, { expires: 7, path: '/' }); $('#everypage').hide('slow'); return false;"><%= _('Close') %></a></p> </div> <% end %> |