From c481bc81f38dc72d1293e27c74e9d1314472233c Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 25 Dec 2013 19:43:27 +0100 Subject: Move the side_body stuff to the right sidebar. --- .../controllers/refinery/pages_controller_decorator.rb | 9 +++++++-- app/views/common/_right_sidebar.html.erb | 4 ++++ app/views/refinery/pages/home.html.erb | 10 ++++------ 3 files changed, 15 insertions(+), 8 deletions(-) (limited to 'app') diff --git a/app/decorators/controllers/refinery/pages_controller_decorator.rb b/app/decorators/controllers/refinery/pages_controller_decorator.rb index cc30030..83b2433 100644 --- a/app/decorators/controllers/refinery/pages_controller_decorator.rb +++ b/app/decorators/controllers/refinery/pages_controller_decorator.rb @@ -12,6 +12,13 @@ ApplicationController.class_eval do Refinery::Blog::Category.all.each do |c| @sidebar_modules << SidebarBlogCategory.new(c) end + + # + # The blog categories and tags are listed in the right sidebar + # on every page. + # + find_all_blog_categories + find_tags end def populate_home_page @@ -20,7 +27,5 @@ ApplicationController.class_eval do # Makes sure everyting is in place for the home page view template. # find_all_blog_posts - find_all_blog_categories - find_tags end end diff --git a/app/views/common/_right_sidebar.html.erb b/app/views/common/_right_sidebar.html.erb index e90e858..023730d 100644 --- a/app/views/common/_right_sidebar.html.erb +++ b/app/views/common/_right_sidebar.html.erb @@ -1,3 +1,7 @@ diff --git a/app/views/refinery/pages/home.html.erb b/app/views/refinery/pages/home.html.erb index 2e8837c..66cd6b7 100644 --- a/app/views/refinery/pages/home.html.erb +++ b/app/views/refinery/pages/home.html.erb @@ -1,4 +1,4 @@ -<% content_for :body_content_left do %> +<% content_for :body do %> <%= raw @page.content_for(Refinery::Pages.default_parts.first.to_sym) if Refinery::Pages.default_parts.any? %> <% if @posts.any? %> @@ -11,10 +11,8 @@ <% end %> <% end %> -<% content_for :body_content_right_prepend do -%> - <%= raw @page.content_for(Refinery::Pages.default_parts.second.to_sym) %> -<% end if Refinery::Pages.default_parts.many? -%> -<%= render :partial => '/refinery/blog/shared/body_content_right' %> +<%= render "/refinery/content_page", + :hide_sections => [:side_body, :body_content_right] + %> -<%= render :partial => "/refinery/content_page" %> <% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %> -- cgit v1.2.3