Add a Sidebar class to represent the side bar

Start using it throughout the rest of the app instead of the various
instance variables
This commit is contained in:
Matt Rogers 2014-09-14 21:47:14 -05:00
parent 2883d1b7f4
commit 8d24f5105a
5 changed files with 66 additions and 17 deletions

View file

@ -562,11 +562,7 @@ class TodosController < ApplicationController
format.html do
init_not_done_counts
init_project_hidden_todo_counts
@active_projects = current_user.projects.active
@active_contexts = current_user.contexts.active
@hidden_projects = current_user.projects.hidden
@hidden_contexts = current_user.contexts.hidden
@completed_projects = current_user.projects.completed
init_data_for_sidebar unless mobile?
end
format.m
format.xml { render :xml => @not_done_todos.to_xml( *todo_xml_params ) }