Added Luke Melia's RSS feed patch #140.

Fixes #140.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@185 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2006-02-13 19:19:16 +00:00
parent 7172b64c20
commit dfe9389ece

View file

@ -6,10 +6,16 @@ xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
@not_done.each { |i|
xml.item do
xml.title(i.description)
@link = url_for(:controller => 'context', :action => 'show', :name => "#{i.context.name}")
xml.link("http://#{@request.host}:#{@request.port}#{@link}")
xml.description(i.context['name'])
end
xml.link(url_for(:only_path => false, :controller => 'context', :action => 'show', :name => urlize(i.context.name)))
item_notes = sanitize(markdown( i.notes )) if i.notes?
context_link = link_to( i.context.name, { :only_path => false, :controller => "context", :action => "show", :name => urlize(i.context.name) } )
project_link = if i.project_id?
link_to (i.project.name, { :only_path => false, :controller => "project", :action => "show", :name => urlize(i.project.name)} )
else
"<em>none</em>"
end
xml.description("#{item_notes||''}\n<div>Project: #{project_link}</div>\n<div>Context: #{context_link}</div>")
end
}
end
end