mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-21 17:50:13 +01:00
Project and context view can now be grouped by context and project (using view menu)
This commit is contained in:
parent
591e20c9f1
commit
0a57a68a87
10 changed files with 34 additions and 15 deletions
|
|
@ -131,12 +131,14 @@ class ProjectsController < ApplicationController
|
|||
@not_done_todos = @project.todos.active_or_hidden.includes(Todo::DEFAULT_INCLUDES)
|
||||
@deferred_todos = @project.todos.deferred.includes(Todo::DEFAULT_INCLUDES)
|
||||
@pending_todos = @project.todos.pending.includes(Todo::DEFAULT_INCLUDES)
|
||||
@contexts_to_show = current_user.contexts.active
|
||||
@projects_to_show = [@project]
|
||||
|
||||
@done = {}
|
||||
@done = @project.todos.completed.
|
||||
reorder("todos.completed_at DESC").
|
||||
limit(current_user.prefs.show_number_completed).
|
||||
includes(Todo::DEFAULT_INCLUDES) unless current_user.prefs.show_number_completed == 0
|
||||
includes(Todo::DEFAULT_INCLUDES) unless @max_completed == 0
|
||||
|
||||
@count = @not_done_todos.size
|
||||
@down_count = @count + @deferred_todos.size + @pending_todos.size
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue