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