From 561d510aa8ca02125abd36d21ce6a1e7ca204b60 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Wed, 8 Aug 2012 17:35:29 +0800 Subject: [PATCH] rss branch end --- .../news_bulletins/index.rss.builder | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/index.rss.builder diff --git a/vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/index.rss.builder b/vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/index.rss.builder new file mode 100644 index 00000000..b4901f70 --- /dev/null +++ b/vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/index.rss.builder @@ -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 \ No newline at end of file