2019-03-17 00:23:17 +00:00
|
|
|
# frozen_string_literal: true
|
2019-03-15 01:32:57 +00:00
|
|
|
|
2007-08-29 16:52:35 +00:00
|
|
|
xml.instruct!
|
|
|
|
|
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
2024-02-07 04:27:01 +00:00
|
|
|
xml.title truncate_single_line_raw(@title, 300)
|
2020-12-22 11:52:16 +00:00
|
|
|
xml.link "rel" => "self", "href" => url_for(:params => request.query_parameters, :only_path => false, :format => 'atom')
|
|
|
|
|
xml.link "rel" => "alternate", "href" => url_for(:params => request.query_parameters.merge(:format => nil, :key => nil), :only_path => false)
|
2014-11-26 19:34:33 +00:00
|
|
|
xml.id home_url
|
2024-10-19 10:06:26 +00:00
|
|
|
xml.icon favicon_url
|
2007-08-29 16:52:35 +00:00
|
|
|
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
|
2020-11-22 13:44:15 +00:00
|
|
|
xml.author {xml.name "#{Setting.app_title}"}
|
2020-11-20 11:37:07 +00:00
|
|
|
xml.generator(:uri => Redmine::Info.url) {xml.text! Redmine::Info.app_name}
|
2007-08-29 16:52:35 +00:00
|
|
|
@items.each do |item|
|
|
|
|
|
xml.entry do
|
2020-12-22 11:52:16 +00:00
|
|
|
url = url_for(item.event_url(:only_path => false))
|
2020-12-14 01:25:34 +00:00
|
|
|
if @project == item.project
|
2024-02-07 04:27:01 +00:00
|
|
|
xml.title truncate_single_line_raw(item.event_title, 300)
|
2008-06-26 14:54:45 +00:00
|
|
|
else
|
2024-02-07 04:27:01 +00:00
|
|
|
xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 300)
|
2008-06-26 14:54:45 +00:00
|
|
|
end
|
2008-03-11 19:33:38 +00:00
|
|
|
xml.link "rel" => "alternate", "href" => url
|
|
|
|
|
xml.id url
|
2007-08-29 16:52:35 +00:00
|
|
|
xml.updated item.event_datetime.xmlschema
|
2008-06-02 18:16:56 +00:00
|
|
|
author = item.event_author if item.respond_to?(:event_author)
|
2007-08-29 16:52:35 +00:00
|
|
|
xml.author do
|
2008-02-16 16:20:35 +00:00
|
|
|
xml.name(author)
|
2023-03-25 01:32:23 +00:00
|
|
|
xml.email(author.mail) if author.is_a?(User) && author.mail.present? && !author.pref.hide_mail
|
2007-08-29 16:52:35 +00:00
|
|
|
end if author
|
|
|
|
|
xml.content "type" => "html" do
|
2009-05-26 08:28:36 +00:00
|
|
|
xml.text! textilizable(item, :event_description, :only_path => false)
|
2007-08-29 16:52:35 +00:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|