Applied an anonymous patch from Germany to add a "mark as done" link to RSS feed items. Fixes #386

Danke!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@325 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2006-10-11 04:40:58 +00:00
parent 57005432e2
commit c89a8249ed

View file

@ -9,8 +9,10 @@ xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
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?
due = "<div>Due: #{format_date(i.due)}</div>\n" if i.due?
done = "<div>Completed: #{format_date(i.completed)}</div>\n" if i.completed?
context_link = link_to( i.context.name, { :only_path => false, :controller => "context", :action => "show", :name => urlize(i.context.name) } )
toggle_link = link_to( "mark as done", {:only_path => false, :controller => "todo", :action => "toggle_check", :id => i.id})
done = "<div>#{toggle_link}</div>" unless i.completed?
done = "<div>Completed: #{format_date(i.completed)}</div>\n" if i.completed?
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