2007-08-29 20:52:35 +04:00
|
|
|
xml.instruct!
|
|
|
|
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
|
|
|
xml.title @title
|
|
|
|
xml.link "rel" => "self", "href" => url_for(params.merge({:format => nil, :only_path => false}))
|
|
|
|
xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false)
|
|
|
|
xml.id url_for(:controller => 'welcome', :only_path => false)
|
|
|
|
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
|
|
|
|
xml.author { xml.name "#{Setting.app_title}" }
|
2007-08-30 02:27:43 +04:00
|
|
|
xml.generator(:uri => Redmine::Info.url, :version => Redmine::VERSION) { xml.text! Redmine::Info.versioned_name; }
|
2007-08-29 20:52:35 +04:00
|
|
|
@items.each do |item|
|
|
|
|
xml.entry do
|
|
|
|
xml.title truncate(item.event_title, 100)
|
|
|
|
xml.link "rel" => "alternate", "href" => url_for(item.event_url(:only_path => false))
|
|
|
|
xml.id url_for(item.event_url(:only_path => false))
|
|
|
|
xml.updated item.event_datetime.xmlschema
|
|
|
|
author = item.event_author
|
|
|
|
xml.author do
|
|
|
|
xml.name(author.is_a?(User) ? author.name : author)
|
|
|
|
xml.email(author.mail) if author.is_a?(User)
|
|
|
|
end if author
|
|
|
|
xml.content "type" => "html" do
|
|
|
|
xml.text! textilizable(item.event_description)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|