diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index c0ec4708..13229734 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -18,6 +18,8 @@ class DashboardController < ApplicationController @projects end + @teams = (UserTeam.with_member(current_user) + UserTeam.created_by(current_user)).uniq + @projects = @projects.page(params[:page]).per(30) @events = Event.in_projects(current_user.authorized_projects.pluck(:id)) diff --git a/app/views/dashboard/_sidebar.html.haml b/app/views/dashboard/_sidebar.html.haml index 9830cdf4..7c6daf6e 100644 --- a/app/views/dashboard/_sidebar.html.haml +++ b/app/views/dashboard/_sidebar.html.haml @@ -1,3 +1,5 @@ +- if @teams.present? + = render "teams", teams: @teams - if @groups.present? = render "groups", groups: @groups = render "projects", projects: @projects