annotate app/views/common/feed.atom.rxml @ 904:0a8317a50fa0 redmine-1.1

Close obsolete branch redmine-1.1
author Chris Cannam
date Fri, 14 Jan 2011 12:53:21 +0000
parents 513646585e45
children
rev   line source
Chris@0 1 xml.instruct!
Chris@0 2 xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
Chris@0 3 xml.title truncate_single_line(@title, :length => 100)
Chris@0 4 xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false))
Chris@0 5 xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
Chris@0 6 xml.id url_for(:controller => 'welcome', :only_path => false)
Chris@0 7 xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
Chris@0 8 xml.author { xml.name "#{Setting.app_title}" }
Chris@0 9 xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
Chris@0 10 @items.each do |item|
Chris@0 11 xml.entry do
Chris@0 12 url = url_for(item.event_url(:only_path => false))
Chris@0 13 if @project
Chris@0 14 xml.title truncate_single_line(item.event_title, :length => 100)
Chris@0 15 else
Chris@0 16 xml.title truncate_single_line("#{item.project} - #{item.event_title}", :length => 100)
Chris@0 17 end
Chris@0 18 xml.link "rel" => "alternate", "href" => url
Chris@0 19 xml.id url
Chris@0 20 xml.updated item.event_datetime.xmlschema
Chris@0 21 author = item.event_author if item.respond_to?(:event_author)
Chris@0 22 xml.author do
Chris@0 23 xml.name(author)
Chris@0 24 xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
Chris@0 25 end if author
Chris@0 26 xml.content "type" => "html" do
Chris@0 27 xml.text! textilizable(item, :event_description, :only_path => false)
Chris@0 28 end
Chris@0 29 end
Chris@0 30 end
Chris@0 31 end