mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-24 08:04:08 +01:00
restores sidebar and refactor sidebar
sidebar was not shown after rails upgrade
This commit is contained in:
parent
f3d7fac2a4
commit
e143a03f73
3 changed files with 17 additions and 7 deletions
|
|
@ -230,6 +230,14 @@ class ApplicationController < ActionController::Base
|
|||
def init_data_for_sidebar
|
||||
@projects = @projects || current_user.projects.find(:all, :include => [:default_context ])
|
||||
@contexts = @contexts || current_user.contexts
|
||||
|
||||
@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
|
||||
|
||||
init_not_done_counts
|
||||
if prefs.show_hidden_projects_in_sidebar
|
||||
init_project_hidden_todo_counts(['project'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue