From 3748c1d9efabde0b62db7b92281c711c6411cfce Mon Sep 17 00:00:00 2001 From: Joe Sak Date: Fri, 11 Mar 2011 14:23:44 -0600 Subject: Closes GH-29. Blog posts act as taggable. rspec & cukes passing --- app/views/blog/posts/archive.html.erb | 3 +-- app/views/blog/posts/index.html.erb | 1 + app/views/blog/posts/show.html.erb | 1 + app/views/blog/posts/tagged.html.erb | 22 ++++++++++++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 app/views/blog/posts/tagged.html.erb (limited to 'app/views/blog/posts') diff --git a/app/views/blog/posts/archive.html.erb b/app/views/blog/posts/archive.html.erb index d44aa7f..a2044e8 100644 --- a/app/views/blog/posts/archive.html.erb +++ b/app/views/blog/posts/archive.html.erb @@ -1,5 +1,4 @@ <% content_for :body_content_left do %> - <%= @page[Page.default_parts.first.to_sym] %>

<%= t('.blog_archive_for', :date => @archive_date.strftime('%B %Y')) %>

<% if @blog_posts.any? %>
@@ -11,8 +10,8 @@ <% end %> <% content_for :body_content_right do %> - <%= @page[Page.default_parts.second.to_sym] %> <%= render :partial => "/blog/shared/categories" %> + <%= render :partial => "/blog/shared/tags" %> <%= render :partial => "/blog/shared/rss_feed" %> <%= blog_archive_list %> <% end %> diff --git a/app/views/blog/posts/index.html.erb b/app/views/blog/posts/index.html.erb index 08e3578..8c3801a 100644 --- a/app/views/blog/posts/index.html.erb +++ b/app/views/blog/posts/index.html.erb @@ -15,6 +15,7 @@ <%=raw @page[Page.default_parts.second.to_sym] if Page.default_parts.many? %> <%= render :partial => "/blog/shared/categories" %> + <%= render :partial => "/blog/shared/tags" %> <%= render :partial => "/blog/shared/rss_feed" %> <%= blog_archive_list %> <% end %> diff --git a/app/views/blog/posts/show.html.erb b/app/views/blog/posts/show.html.erb index 504db2c..92898a4 100644 --- a/app/views/blog/posts/show.html.erb +++ b/app/views/blog/posts/show.html.erb @@ -49,6 +49,7 @@ <% content_for :body_content_right do %> <%= render :partial => "/blog/shared/categories" %> + <%= render :partial => "/blog/shared/tags" %> <%= render :partial => "/blog/shared/posts" %> <%= render :partial => "/blog/shared/rss_feed" %> <%= blog_archive_list %> diff --git a/app/views/blog/posts/tagged.html.erb b/app/views/blog/posts/tagged.html.erb new file mode 100644 index 0000000..29de791 --- /dev/null +++ b/app/views/blog/posts/tagged.html.erb @@ -0,0 +1,22 @@ +<% content_for :body_content_title, "Posts tagged “#{@tag_name.titleize}”".html_safe -%> + +<% content_for :body_content_left do %> + <% if @blog_posts.any? %> +
+ <%= render :partial => "/blog/shared/post", :collection => @blog_posts %> + <%= will_paginate @blog_posts %> +
+ <% else %> +

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

+ <% end %> +<% end %> + +<% content_for :body_content_right do %> + <%= render :partial => "/blog/shared/categories" %> + <%= render :partial => "/blog/shared/tags" %> + <%= render :partial => "/blog/shared/rss_feed" %> + <%= blog_archive_list %> +<% end %> + +<%= render :partial => "/shared/content_page" %> +<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> -- cgit v1.2.3