add dashboard teams block

This commit is contained in:
Andrey Kumanyaev 2013-01-19 21:48:46 +04:00 committed by Dmitriy Zaporozhets
parent a96cf3ad09
commit 3c6e144608
2 changed files with 4 additions and 0 deletions

View file

@ -18,6 +18,8 @@ class DashboardController < ApplicationController
@projects @projects
end end
@teams = (UserTeam.with_member(current_user) + UserTeam.created_by(current_user)).uniq
@projects = @projects.page(params[:page]).per(30) @projects = @projects.page(params[:page]).per(30)
@events = Event.in_projects(current_user.authorized_projects.pluck(:id)) @events = Event.in_projects(current_user.authorized_projects.pluck(:id))

View file

@ -1,3 +1,5 @@
- if @teams.present?
= render "teams", teams: @teams
- if @groups.present? - if @groups.present?
= render "groups", groups: @groups = render "groups", groups: @groups
= render "projects", projects: @projects = render "projects", projects: @projects