add a txt ans rss feed for starred actions

This commit is contained in:
Reinier Balt 2008-07-24 21:06:10 +02:00
parent e3f444575d
commit 49aac48616
2 changed files with 13 additions and 0 deletions

View file

@ -416,6 +416,14 @@ class TodosController < ApplicationController
@title << " actions completed"
@description << " in the last #{done_in_last.to_s} days"
end
if params.key?('tag')
tag = Tag.find_by_name(params['tag'])
if tag.nil?
tag = Tag.new(:name => params['tag'])
end
condition_builder.add('taggings.tag_id = ?', tag.id)
end
Todo.send :with_scope, :find => {:conditions => condition_builder.to_conditions} do
yield

View file

@ -54,6 +54,11 @@
<%= text_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %>
Active projects with no next actions
</li>
<li>
<%= rss_formatted_link({:controller => 'todos', :action => 'index', :tag => 'starred'}) %>
<%= text_formatted_link({:controller => 'todos', :action => 'index', :tag => 'starred'}) %>
All starred, active actions
</li>
<li>
<%= text_formatted_link({:controller => 'projects', :action => 'index', :projects_and_actions => true}) %>
Active projects with their actions