mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-31 13:15:17 +01:00
add a txt ans rss feed for starred actions
This commit is contained in:
parent
e3f444575d
commit
49aac48616
2 changed files with 13 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue