From bd50bdb415346329e772a90f26828376a6a1cffb Mon Sep 17 00:00:00 2001 From: djones Date: Mon, 6 Sep 2010 16:22:13 +1200 Subject: refactoring the frontend to use more partials, separate out the categories into it's own controller, namespace the blog into it's own folder and create a base blog controller for handling common front end tasks --- app/views/blog_posts/_categories.html.erb | 0 app/views/blog_posts/_comments.html.erb | 0 app/views/blog_posts/_side_bar.html.erb | 8 --- app/views/blog_posts/index.html.erb | 27 ---------- app/views/blog_posts/show.html.erb | 89 ------------------------------- 5 files changed, 124 deletions(-) delete mode 100644 app/views/blog_posts/_categories.html.erb delete mode 100644 app/views/blog_posts/_comments.html.erb delete mode 100644 app/views/blog_posts/_side_bar.html.erb delete mode 100644 app/views/blog_posts/index.html.erb delete mode 100644 app/views/blog_posts/show.html.erb (limited to 'app/views/blog_posts') diff --git a/app/views/blog_posts/_categories.html.erb b/app/views/blog_posts/_categories.html.erb deleted file mode 100644 index e69de29..0000000 diff --git a/app/views/blog_posts/_comments.html.erb b/app/views/blog_posts/_comments.html.erb deleted file mode 100644 index e69de29..0000000 diff --git a/app/views/blog_posts/_side_bar.html.erb b/app/views/blog_posts/_side_bar.html.erb deleted file mode 100644 index dfdfaa2..0000000 --- a/app/views/blog_posts/_side_bar.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

<%= t('.categories') %>

- \ No newline at end of file diff --git a/app/views/blog_posts/index.html.erb b/app/views/blog_posts/index.html.erb deleted file mode 100644 index c97ca61..0000000 --- a/app/views/blog_posts/index.html.erb +++ /dev/null @@ -1,27 +0,0 @@ -<% content_for :body_content_left do %> - <%= @page[Page.default_parts.first.to_sym] %> - - -<% end %> - -<% content_for :body_content_right do %> - <%= @page[Page.default_parts.second.to_sym] %> - - <%= render :partial => "side_bar" %> -<% end %> - -<%= render :partial => "/shared/content_page" %> -<% content_for :head do %> - <%= stylesheet_link_tag 'refinerycms-blog' %> -<% end %> \ No newline at end of file diff --git a/app/views/blog_posts/show.html.erb b/app/views/blog_posts/show.html.erb deleted file mode 100644 index e13a442..0000000 --- a/app/views/blog_posts/show.html.erb +++ /dev/null @@ -1,89 +0,0 @@ -<% content_for :body_content_title, @blog_post.title %> - -<% content_for :body_content_left do %> - <%= t('.created_at', :when => @blog_post.created_at.strftime('%d %B %Y')) %> - <%= @blog_post.body %> - - <% if (categories = @blog_post.categories).any? %> -
-
- <%= t('.filed_in') %> - -
- <% end %> - - <% if (comments = @blog_post.comments.approved).any? %> -
-

<%= t('.comments.title') %>

- <% comments.each do |comment| %> -
-

- <%= comment.message.to_s.gsub("\r\n\r\n", "

").gsub("\r\n", "
") %> -

-
-

- <%= t('.comments.by', :who => comment.name) %> - <%= t('.comments.time_ago', :time => time_ago_in_words(comment.created_at)) %> -

- <% end %> - <% end %> - - <% if BlogPost.comments_allowed? %> -
- <% flash.each do |key, value| %> -
- <%= value %> -
- <% end %> - <% form_for [:blog_post, @blog_comment] do |f| %> - <% if Rails.version < '3.0.0'%> - <%= f.error_messages %> - <% else %> - <%= render :partial => "/shared/admin/error_messages", - :locals => { - :object => f.object, - :include_object_name => true - } %> - <% end %> -
- <%= f.label :name %> - <%= f.text_field :name %> -
-
- <%= f.label :email %> - <%= f.text_field :email %> -
-
- <%= f.label :message %> - <%= f.text_area :message, :rows => 6 %> -
-
- <%= f.submit t('.submit') %> -
- <% end %> - <% end %> -<% end %> - -<% content_for :body_content_right do %> - <%= render :partial => "side_bar" %> - -

<%= t('.other') %>

- -<% end %> - -<%= render :partial => "/shared/content_page" %> -<% content_for :head do %> - <%= stylesheet_link_tag 'refinerycms-blog' %> -<% end %> \ No newline at end of file -- cgit v1.2.3