Applied a variation of the patch submitted with #367 by a nameless contrbutor (thanks, whoever you are!). This should bring our iCal feeds more in line with the spec (RFC 2445) and make them work better with Evolution and perhaps other iCal consumers.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@315 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2006-08-25 03:36:44 +00:00
parent 3002fcf2f1
commit c0b0e14b9e
2 changed files with 5 additions and 0 deletions

View file

@ -62,6 +62,10 @@ module FeedHelper
joined_notes = split_notes.join("\\n")
end
def format_ical_uid(todo)
sprintf("%s%s%s%s", @request.protocol, @request.host, @request.port_string, url_for(:controller => 'todo', :action => 'show', :id => todo.id))
end
def rss_feed_link(options = {})
image_tag = image_tag("feed-icon", :size => "16X16", :border => 0, :class => "rss-icon")
linkoptions = {:controller => 'feed', :action => 'rss', :name => "#{@user.login}", :token => "#{@user.word}"}

View file

@ -13,6 +13,7 @@ BEGIN:VTODO
DTSTAMP:<%= @todo.created_at.strftime("%Y%m%dT%H%M%SZ") %>
DTSTART;VALUE=DATE:<%= @todo.created_at.strftime("%Y%m%d") %>
SUMMARY:<%= @todo.description %>
UID:<%= format_ical_uid(@todo) %>
<% if @todo.notes? -%>
DESCRIPTION:<%= format_ical_notes(@todo.notes) %>
<% end -%>