rss branch end

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-08-09 17:04:08 +08:00
1 parent 1aea8d91f4
commit 561d510aa8
1 file changed
+21
@@ -0,0 +1,21 @@
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
if @current_category
xml.title @current_category.i18n_variable[I18n.locale]
else
xml.title t('news.campus_news')
end
xml.link panel_news_front_end_news_bulletins_path(:rss)
for news_bulletin in @news_bulletins
xml.item do
xml.title news_bulletin.title[I18n.locale]
xml.description news_bulletin.text[I18n.locale]
xml.pubDate news_bulletin.postdate.to_s(:rfc822)
xml.link panel_news_front_end_news_bulletin_path(news_bulletin, :rss)
xml.guid panel_news_front_end_news_bulletin_path(news_bulletin, :rss)
end
end
end
end