rss branch end

This commit is contained in:
Matthew K. Fu JuYuan 2012-08-08 17:35:29 +08:00 committed by Christophe Vilayphiou
parent 1aea8d91f4
commit 561d510aa8
1 changed files with 21 additions and 0 deletions

View File

@ -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