mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-28 11:46:10 +01:00
do a big refactor of rendering collections of todos for home page, tag page, project page, context page
This commit is contained in:
parent
f22dfc1f9b
commit
22b371ef8c
20 changed files with 910 additions and 816 deletions
|
|
@ -43,13 +43,13 @@ class ContextsController < ApplicationController
|
|||
@done = @context.todos.completed.limit(@max_completed).reorder("todos.completed_at DESC, todos.created_at DESC").includes(Todo::DEFAULT_INCLUDES)
|
||||
@not_done_todos = @context.todos.active.reorder("todos.due IS NULL, todos.due ASC, todos.created_at ASC").includes(Todo::DEFAULT_INCLUDES)
|
||||
|
||||
@deferred = @context.todos.deferred.includes(Todo::DEFAULT_INCLUDES)
|
||||
@pending = @context.todos.pending.includes(Todo::DEFAULT_INCLUDES)
|
||||
@deferred_todos = @context.todos.deferred.includes(Todo::DEFAULT_INCLUDES)
|
||||
@pending_todos = @context.todos.pending.includes(Todo::DEFAULT_INCLUDES)
|
||||
|
||||
@projects = current_user.projects
|
||||
@contexts = current_user.contexts
|
||||
|
||||
@count = @not_done_todos.count + @deferred.count + @pending.count
|
||||
@count = @not_done_todos.count + @deferred_todos.count + @pending_todos.count
|
||||
@page_title = "TRACKS::Context: #{@context.name}"
|
||||
respond_to do |format|
|
||||
format.html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue