2007-08-29 20:52:35 +04:00
|
|
|
xml.instruct!
|
|
|
|
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
2009-02-21 14:04:50 +03:00
|
|
|
xml.title truncate_single_line(@title, :length => 100)
|
2012-04-25 21:17:49 +04:00
|
|
|
xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false))
|
|
|
|
xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
|
2007-08-29 20:52:35 +04:00
|
|
|
xml.id url_for(:controller => 'welcome', :only_path => false)
|
2014-01-12 14:03:59 +04:00
|
|
|
xml.icon favicon_url
|
2007-08-29 20:52:35 +04:00
|
|
|
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
|
|
|
|
xml.author { xml.name "#{Setting.app_title}" }
|
2008-11-09 23:39:49 +03:00
|
|
|
xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_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
|
2009-02-21 14:04:50 +03:00
|
|
|
xml.title truncate_single_line(item.event_title, :length => 100)
|
2008-06-26 18:54:45 +04:00
|
|
|
else
|
2009-02-21 14:04:50 +03:00
|
|
|
xml.title truncate_single_line("#{item.project} - #{item.event_title}", :length => 100)
|
2008-06-26 18:54:45 +04:00
|
|
|
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)
|
2009-05-25 22:11:32 +04:00
|
|
|
xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
|
2007-08-29 20:52:35 +04:00
|
|
|
end if author
|
|
|
|
xml.content "type" => "html" do
|
2009-05-26 12:28:36 +04:00
|
|
|
xml.text! textilizable(item, :event_description, :only_path => false)
|
2007-08-29 20:52:35 +04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|