0
@@ -106,6 +106,7 @@ class TodosController < ApplicationController
0
@projects = current_user.projects.find(:all)
0
@contexts = current_user.contexts.find(:all)
0
@source_view = params['_source_view'] || 'todo'
0
+ @tag_name = params['_tag_name']
0
@@ -212,7 +213,7 @@ class TodosController < ApplicationController
0
# strange. if checkbox is not checked, there is no 'done' in params.
0
- # Ther
fore I've used the negation
0
+ # Ther
efore I've used the negation
0
if !(params['done'] == '1') && @todo.completed?
0
@@ -336,6 +337,7 @@ class TodosController < ApplicationController
0
# /todos/tag/[tag_name] shows all the actions tagged with tag_name
0
+ @page_title = "TRACKS::Tagged with \'#{@tag_name}\'"
0
@source_view = params['_source_view'] || 'tag'
0
@tag_name = params[:name]
0
@@ -344,28 +346,33 @@ class TodosController < ApplicationController
0
@tag = Tag.find_by_name(@tag_name)
0
@tag = Tag.new(:name => @tag_name) if @tag.nil?
0
tag_collection = @tag.todos
0
- @not_done_todos = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'active'])
0
+ @not_done_todos = tag_collection.find(:all,
0
+ :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'active'],
0
+ :order => 'todos.completed_at DESC, todos.created_at DESC')
0
@hidden_todos = current_user.todos.find(:all,
0
:include => [:taggings, :tags, :context],
0
- :conditions => ['tags.name = ? AND (todos.state = ? OR (contexts.hide = ? AND todos.state = ?))', @tag_name, 'project_hidden', true, 'active'])
0
+ :conditions => ['tags.name = ? AND (todos.state = ? OR (contexts.hide = ? AND todos.state = ?))', @tag_name, 'project_hidden', true, 'active'],
0
+ :order => 'todos.completed_at DESC, todos.created_at DESC')
0
+ @deferred = tag_collection.find(:all,
0
+ :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'deferred'],
0
+ :order => 'show_from ASC, todos.created_at DESC')
0
+ # If you've set no_completed to zero, the completed items box isn't shown on
0
+ max_completed = current_user.prefs.show_number_completed
0
+ @done = tag_collection.find(:all,
0
+ :limit => max_completed,
0
+ :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'completed'],
0
+ :order => 'todos.completed_at DESC')
0
@contexts = current_user.contexts.find(:all)
0
@contexts_to_show = @contexts.reject {|x| x.hide? }
0
- @deferred = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'deferred'])
0
- @page_title = "TRACKS::Tagged with \'#{@tag_name}\'"
0
- # If you've set no_completed to zero, the completed items box isn't shown on
0
- max_completed = current_user.prefs.show_number_completed
0
- @done = tag_collection.find(:all, :limit => max_completed, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'completed'])
0
# Set count badge to number of items with this tag
0
@not_done_todos.empty? ? @count = 0 : @count = @not_done_todos.size
0
- # @default_project_context_name_map =
0
- # build_default_project_context_name_map(@projects).to_json
0
@default_project_context_name_map = build_default_project_context_name_map(@projects).to_json