mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
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:
parent
2883d1b7f4
commit
8d24f5105a
5 changed files with 66 additions and 17 deletions
|
|
@ -212,12 +212,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def init_data_for_sidebar
|
||||
@completed_projects = current_user.projects.completed
|
||||
@hidden_projects = current_user.projects.hidden
|
||||
@active_projects = current_user.projects.active
|
||||
|
||||
@active_contexts = current_user.contexts.active
|
||||
@hidden_contexts = current_user.contexts.hidden
|
||||
@sidebar = Sidebar.new(current_user)
|
||||
|
||||
init_not_done_counts
|
||||
if prefs.show_hidden_projects_in_sidebar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue