Archive: ComponentOwl Rails app, DB backups, go redirect script
This commit is contained in:
29
app/views/feeds/index.rss.builder
Normal file
29
app/views/feeds/index.rss.builder
Normal file
@@ -0,0 +1,29 @@
|
||||
xml.instruct! :xml, :version => "1.0"
|
||||
xml.rss :version => "2.0" do
|
||||
xml.channel do
|
||||
xml.title t('txt.rss.title')
|
||||
xml.description t('txt.rss.description')
|
||||
xml.link feeds_url
|
||||
|
||||
for post in @posts
|
||||
xml.item do
|
||||
if post.is_a? Release
|
||||
link = releases_page_url(post.product, post.version)
|
||||
xml.title t('txt.home.new_release', :product => strip_version(post.product.name), :version => post.version)
|
||||
if post.has_changelog?
|
||||
xml.description t('txt.rss.release_description', :whats_new_url => link, :download_url => download_url(post.product))
|
||||
else
|
||||
xml.description link_to(t('txt.rss.download_latest_release'), download_url(post.product))
|
||||
end
|
||||
xml.pubDate post.date.to_datetime.to_s(:rfc822)
|
||||
xml.link link
|
||||
else
|
||||
xml.title post.title
|
||||
xml.description post.intro
|
||||
xml.pubDate post.date.to_s(:rfc822)
|
||||
xml.link post.url
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user