##// END OF EJS Templates
Fixed: Atom feeds don't provide author section for repository revisions (#1348)....
Jean-Philippe Lang -
r1471:870e8654b4dd
parent child
Show More
@@ -1,27 +1,27
1 xml.instruct!
1 xml.instruct!
2 xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
2 xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
3 xml.title @title
3 xml.title @title
4 xml.link "rel" => "self", "href" => url_for(params.merge({:format => nil, :only_path => false}))
4 xml.link "rel" => "self", "href" => url_for(params.merge({:format => nil, :only_path => false}))
5 xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false)
5 xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false)
6 xml.id url_for(:controller => 'welcome', :only_path => false)
6 xml.id url_for(:controller => 'welcome', :only_path => false)
7 xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
7 xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
8 xml.author { xml.name "#{Setting.app_title}" }
8 xml.author { xml.name "#{Setting.app_title}" }
9 xml.generator(:uri => Redmine::Info.url, :version => Redmine::VERSION) { xml.text! Redmine::Info.versioned_name; }
9 xml.generator(:uri => Redmine::Info.url, :version => Redmine::VERSION) { xml.text! Redmine::Info.versioned_name; }
10 @items.each do |item|
10 @items.each do |item|
11 xml.entry do
11 xml.entry do
12 url = url_for(item.event_url(:only_path => false))
12 url = url_for(item.event_url(:only_path => false))
13 xml.title truncate(item.event_title, 100)
13 xml.title truncate(item.event_title, 100)
14 xml.link "rel" => "alternate", "href" => url
14 xml.link "rel" => "alternate", "href" => url
15 xml.id url
15 xml.id url
16 xml.updated item.event_datetime.xmlschema
16 xml.updated item.event_datetime.xmlschema
17 author = item.event_author if item.respond_to?(:author)
17 author = item.event_author if item.respond_to?(:event_author)
18 xml.author do
18 xml.author do
19 xml.name(author)
19 xml.name(author)
20 xml.email(author.mail) if author.respond_to?(:mail) && !author.mail.blank?
20 xml.email(author.mail) if author.respond_to?(:mail) && !author.mail.blank?
21 end if author
21 end if author
22 xml.content "type" => "html" do
22 xml.content "type" => "html" do
23 xml.text! textilizable(item.event_description)
23 xml.text! textilizable(item.event_description)
24 end
24 end
25 end
25 end
26 end
26 end
27 end
27 end
General Comments 0
You need to be logged in to leave comments. Login now