merge blog features that got deleted when repo was renamed.
[leap_website.git] / app / helpers / blog_helper.rb
1 module BlogHelper
2
3   def recent_blog_summaries(path)
4     root = StaticPage.find(path)
5     if root
6       pages = root.all_children.order_by(:posted_at, :direction => :desc).limit(PAGINATION_SIZE)
7       haml do
8         pages.each do |page|
9           haml render(:partial => 'layouts/blog/summary', :locals => {:page => page})
10         end
11       end
12     end
13   end
14
15   def news_feed_link
16     link_to(image_tag('/img/feed-icon-14x14.png'), "/#{I18n.locale}/news.atom")
17   end
18 end