aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjones <dgjones@gmail.com>2010-11-26 16:55:52 +1300
committerdjones <dgjones@gmail.com>2010-11-26 16:55:52 +1300
commita30753a7a5691a39a6bc7a26563107dee249484d (patch)
treea335be1e03cdae02a2010f405de6a60d34985cb5
parent9b7cc770a2b6df6d947af3386fe99b9d1a97d648 (diff)
downloadrefinerycms-blog-a30753a7a5691a39a6bc7a26563107dee249484d.tar.gz
refinerycms-blog-a30753a7a5691a39a6bc7a26563107dee249484d.tar.bz2
refinerycms-blog-a30753a7a5691a39a6bc7a26563107dee249484d.zip
keep to the same markup scheme Refinery uses for the menu
-rw-r--r--app/helpers/blog_posts_helper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/blog_posts_helper.rb b/app/helpers/blog_posts_helper.rb
index e690a51..53bdb75 100644
--- a/app/helpers/blog_posts_helper.rb
+++ b/app/helpers/blog_posts_helper.rb
@@ -2,7 +2,7 @@ module BlogPostsHelper
def blog_archive_list
posts = BlogPost.select('published_at').all_previous
return nil if posts.blank?
- html = '<section id="blog_archive_list"><h1>Archives</h1><nav>'
+ html = '<section id="blog_archive_list"><h2>Archives</h2><nav><ul>'
links = []
posts.each do |e|
@@ -14,9 +14,11 @@ module BlogPostsHelper
month = l.split('/')[0]
count = BlogPost.by_archive(Time.parse(l)).size
text = "#{Date::MONTHNAMES[month.to_i]} #{year} (#{count})"
+ html += "<li>"
html += link_to(text, archive_blog_posts_path(:year => year, :month => month))
+ html += "</li>"
end
- html += '</nav></section>'
+ html += '</ul></nav></section>'
html.html_safe
end