public
Description: Tracks is a GTD(TM) web application, built with Ruby on Rails
Homepage: http://www.rousette.org.uk/projects/
Clone URL: git://github.com/bsag/tracks.git
Click here to lend your support to: tracks and make a donation at www.pledgie.com !
fix #793 where the feed title is given more information about the content

also fixes project feed where the link in the feed points to the context of the 
todo instead of the project
lrbalt (author)
Sat Nov 29 11:32:39 -0800 2008
commit  ee3057185540408b54ed016712805fe08eba4956
tree    6450edba20a218801d20508603340e8cc69e8d8c
parent  5659b8adbb321311673611c53bf4af9de0f73c82
...
536
537
538
 
539
540
 
541
542
543
544
545
 
 
546
547
548
...
718
719
720
721
 
722
723
724
...
726
727
728
729
 
 
 
730
731
732
...
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
...
722
723
724
 
725
726
727
728
...
730
731
732
 
733
734
735
736
737
738
0
@@ -536,13 +536,17 @@ class TodosController < ApplicationController
0
   end
0
 
0
   def with_parent_resource_scope(&block)
0
+    @feed_title = "Actions "
0
     if (params[:context_id])
0
       @context = current_user.contexts.find_by_params(params)
0
+      @feed_title = @feed_title + "in context '#{@context.name}'"
0
       Todo.send :with_scope, :find => {:conditions => ['todos.context_id = ?', @context.id]} do
0
         yield
0
       end
0
     elsif (params[:project_id])
0
       @project = current_user.projects.find_by_params(params)
0
+      @feed_title = @feed_title + "in project '#{@project.name}'"
0
+      @project_feed = true
0
       Todo.send :with_scope, :find => {:conditions => ['todos.project_id = ?', @project.id]} do
0
         yield
0
       end
0
@@ -718,7 +722,7 @@ class TodosController < ApplicationController
0
       render_rss_feed_for @todos, :feed => todo_feed_options,
0
         :item => {
0
         :title => :description,
0
-        :link => lambda { |t| context_url(t.context) },
0
+        :link => lambda { |t| @project_feed.nil? ? context_url(t.context) : project_url(t.project) },
0
         :guid => lambda { |t| todo_url(t) },
0
         :description => todo_feed_content
0
       }
0
@@ -726,7 +730,9 @@ class TodosController < ApplicationController
0
   end
0
     
0
   def todo_feed_options
0
-    Todo.feed_options(current_user)
0
+    options = Todo.feed_options(current_user)
0
+    options[:title] = @feed_title
0
+    return options
0
   end
0
 
0
   def todo_feed_content

Comments