2007-08-29 20:52:35 +04:00
|
|
|
xml.instruct!
|
|
|
|
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
2008-06-04 22:13:14 +04:00
|
|
|
xml.title truncate_single_line(@title, 100)
|
2007-08-29 20:52:35 +04:00
|
|
|
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
|
2008-03-11 22:33:38 +03:00
|
|
|
url = url_for(item.event_url(:only_path => false))
|
2008-06-26 18:54:45 +04:00
|
|
|
if @project
|
|
|
|
xml.title truncate_single_line(item.event_title, 100)
|
|
|
|
else
|
|
|
|
xml.title truncate_single_line("#{item.project} - #{item.event_title}", 100)
|
|
|
|
end
|
2008-03-11 22:33:38 +03:00
|
|
|
xml.link "rel" => "alternate", "href" => url
|
|
|
|
xml.id url
|
2007-08-29 20:52:35 +04:00
|
|
|
xml.updated item.event_datetime.xmlschema
|
2008-06-02 22:16:56 +04:00
|
|
|
author = item.event_author if item.respond_to?(:event_author)
|
2007-08-29 20:52:35 +04:00
|
|
|
xml.author do
|
2008-02-16 19:20:35 +03:00
|
|
|
xml.name(author)
|
|
|
|
xml.email(author.mail) if author.respond_to?(:mail) && !author.mail.blank?
|
2007-08-29 20:52:35 +04:00
|
|
|
end if author
|
|
|
|
xml.content "type" => "html" do
|
|
|
|
xml.text! textilizable(item.event_description)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|