orbit-announcement/app/views/panel/announcement/front_end/bulletins/index.rss.builder

23 lines
973 B
Ruby

xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
if @current_category
xml.title @current_category.title_translations[I18n.locale.to_s]
else
xml.title t('announcement.announcement')
end
xml.link url_for(:action=>"index", :controller=>"panel/announcement/front_end/bulletins",:format=> :rss,:only_path=>false,:inner=>true)
for bulletin in @bulletins
xml.item do
xml.title bulletin.title_translations[I18n.locale.to_s]
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.guid url_for(:action=>"show", :controller=>"panel/announcement/front_end/bulletins", :id=>bulletin ,:only_path=>false)
xml.fb_share generate_fb_url(bulletin, "announcement")
end
end
end
end