add content for announcement rss

This commit is contained in:
Rueshyna 2012-12-04 10:29:30 +08:00
parent e429aa9425
commit a790c0c482
2 changed files with 4 additions and 3 deletions

View File

@ -12,6 +12,7 @@ xml.rss :version => "2.0" do
xml.item do xml.item do
xml.title bulletin.title_translations[I18n.locale.to_s] xml.title bulletin.title_translations[I18n.locale.to_s]
xml.pubDate bulletin.postdate.to_s(:rfc822) xml.pubDate bulletin.postdate.to_s(:rfc822)
xml.description bulletin.text_translations[I18n.locale.to_s]
xml.link url_for(:action=>"show", :controller=>"panel/announcement/front_end/bulletins", :id=>bulletin ,:only_path=>false) xml.link url_for(:action=>"show", :controller=>"panel/announcement/front_end/bulletins", :id=>bulletin ,:only_path=>false)
xml.guid url_for(:action=>"show", :controller=>"panel/announcement/front_end/bulletins", :id=>bulletin ,:only_path=>false) xml.guid url_for(:action=>"show", :controller=>"panel/announcement/front_end/bulletins", :id=>bulletin ,:only_path=>false)
xml.fb_share generate_fb_url(bulletin, "announcement") xml.fb_share generate_fb_url(bulletin, "announcement")

View File

@ -8,8 +8,8 @@ xml.rss :version => "2.0" do
end end
xml.link url_for(:action=>"index", :controller=>"panel/announcement/front_end/bulletins",:format=> :rss,:only_path=>false,:inner=>true) xml.link url_for(:action=>"index", :controller=>"panel/announcement/front_end/bulletins",:format=> :rss,:only_path=>false,:inner=>true)
xml.item do xml.item do
xml.title @bulletin.title xml.title @bulletin.title_translations[I18n.locale.to_s]
xml.description @bulletin.text xml.description @bulletin.text_translations[I18n.locale.to_s]
xml.pubDate @bulletin.postdate.to_s(:rfc822) xml.pubDate @bulletin.postdate.to_s(:rfc822)
xml.link url_for(:action=>"show", :controller=>"panel/announcement/front_end/bulletins", :id=>@bulletin ,:format=> :rss,:only_path=>false,:inner=>true) xml.link url_for(:action=>"show", :controller=>"panel/announcement/front_end/bulletins", :id=>@bulletin ,:format=> :rss,:only_path=>false,:inner=>true)
xml.guid url_for(:action=>"show", :controller=>"panel/announcement/front_end/bulletins", :id=>@bulletin ,:only_path=>false) xml.guid url_for(:action=>"show", :controller=>"panel/announcement/front_end/bulletins", :id=>@bulletin ,:only_path=>false)