Commit 3c6e144608b655ff1b43ec33baf020d19d460ba8

Authored by Andrey Kumanyaev
Committed by Dmitriy Zaporozhets
1 parent a96cf3ad

add dashboard teams block

app/controllers/dashboard_controller.rb
... ... @@ -18,6 +18,8 @@ class DashboardController < ApplicationController
18 18 @projects
19 19 end
20 20  
  21 + @teams = (UserTeam.with_member(current_user) + UserTeam.created_by(current_user)).uniq
  22 +
21 23 @projects = @projects.page(params[:page]).per(30)
22 24  
23 25 @events = Event.in_projects(current_user.authorized_projects.pluck(:id))
... ...
app/views/dashboard/_sidebar.html.haml
  1 +- if @teams.present?
  2 + = render "teams", teams: @teams
1 3 - if @groups.present?
2 4 = render "groups", groups: @groups
3 5 = render "projects", projects: @projects
... ...