diff options
author | Andrey Kumanyaev <me@zzet.org> | 2013-01-19 21:48:46 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-24 22:31:24 +0200 |
commit | 3c6e144608b655ff1b43ec33baf020d19d460ba8 (patch) | |
tree | 16585b503eb6c6b89cb35c34687bf6f1cdbc3275 | |
parent | a96cf3ad09c06fb5bfe668a77edc5d7adb2d092f (diff) | |
download | gitlab-ce-3c6e144608b655ff1b43ec33baf020d19d460ba8.tar.gz |
add dashboard teams block
-rw-r--r-- | app/controllers/dashboard_controller.rb | 2 | ||||
-rw-r--r-- | app/views/dashboard/_sidebar.html.haml | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index c0ec4708e0a..1322973489c 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 9830cdf4f6b..7c6daf6ec31 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 |