Chris@0: xml.instruct! Chris@0: xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do Chris@0: xml.title truncate_single_line(@title, :length => 100) Chris@0: xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false)) Chris@0: xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil)) Chris@0: xml.id url_for(:controller => 'welcome', :only_path => false) Chris@0: xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema) Chris@0: xml.author { xml.name "#{Setting.app_title}" } Chris@0: xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; } Chris@0: @items.each do |item| Chris@0: xml.entry do Chris@0: url = url_for(item.event_url(:only_path => false)) Chris@0: if @project Chris@0: xml.title truncate_single_line(item.event_title, :length => 100) Chris@0: else Chris@0: xml.title truncate_single_line("#{item.project} - #{item.event_title}", :length => 100) Chris@0: end Chris@0: xml.link "rel" => "alternate", "href" => url Chris@0: xml.id url Chris@0: xml.updated item.event_datetime.xmlschema Chris@0: author = item.event_author if item.respond_to?(:event_author) Chris@0: xml.author do Chris@0: xml.name(author) Chris@0: xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail Chris@0: end if author Chris@0: xml.content "type" => "html" do Chris@0: xml.text! textilizable(item, :event_description, :only_path => false) Chris@0: end Chris@0: end Chris@0: end Chris@0: end