aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/blog/posts/archive.html.erb3
-rw-r--r--app/views/blog/posts/index.html.erb1
-rw-r--r--app/views/blog/posts/show.html.erb1
-rw-r--r--app/views/blog/posts/tagged.html.erb22
-rw-r--r--app/views/blog/shared/_post.html.erb10
-rw-r--r--app/views/blog/shared/_tags.html.erb8
6 files changed, 40 insertions, 5 deletions
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] %>
<h1><%= t('.blog_archive_for', :date => @archive_date.strftime('%B %Y')) %></h1>
<% if @blog_posts.any? %>
<section id="blog_posts">
@@ -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 &#8220;#{@tag_name.titleize}&#8221;".html_safe -%>
+
+<% content_for :body_content_left do %>
+ <% if @blog_posts.any? %>
+ <section id="blog_posts">
+ <%= render :partial => "/blog/shared/post", :collection => @blog_posts %>
+ <%= will_paginate @blog_posts %>
+ </section>
+ <% else %>
+ <p><%= t('.no_blog_articles_yet') %></p>
+ <% 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') %>
diff --git a/app/views/blog/shared/_post.html.erb b/app/views/blog/shared/_post.html.erb
index 2e92f73..716c1ad 100644
--- a/app/views/blog/shared/_post.html.erb
+++ b/app/views/blog/shared/_post.html.erb
@@ -9,9 +9,13 @@
<% if (categories = post.categories).any? %>
<aside class='filed_in'>
<%= t('filed_in', :scope => 'blog.posts.show') %>
- <% categories.each_with_index do |category, index| %>
- <%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
- <% end %>
+ <%=raw categories.collect { |category| link_to category.title, blog_category_url(category) }.to_sentence %>
+ </aside>
+ <% end %>
+ <% if (tags = post.tag_list).any? %>
+ <aside class='tagged'>
+ <%= t('tagged', :scope => 'blog.posts.show') %>
+ <%=raw tags.collect { |tag| link_to tag, tagged_posts_path(tag.parameterize) }.to_sentence %>
</aside>
<% end %>
</details>
diff --git a/app/views/blog/shared/_tags.html.erb b/app/views/blog/shared/_tags.html.erb
new file mode 100644
index 0000000..f8833f1
--- /dev/null
+++ b/app/views/blog/shared/_tags.html.erb
@@ -0,0 +1,8 @@
+<% unless @tags.nil? %>
+ <h2><%= t('.title') %></h2>
+ <nav id='tags'>
+ <% tag_cloud(@tags, %w(tag1 tag2 tag3 tag4)) do |tag, css_class| %>
+ <%= link_to tag.name, tagged_posts_path(tag.name.parameterize), :class => css_class %>
+ <% end %>
+ </nav>
+<% end %> \ No newline at end of file