annotate app/views/common/feed.atom.builder @ 1327:287f201c2802 redmine-2.2-integration

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