summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-29 21:45:19 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-29 21:45:19 +0300
commitb32088414941fefd85172614ba6d615db2f07961 (patch)
treebf973d3d04bab90ca922f31348cff5a99ad21de4 /app/controllers/dashboard_controller.rb
parent07f156f5c2c6776079f0210f4067121d1b74048d (diff)
downloadgitlab-ce-b32088414941fefd85172614ba6d615db2f07961.tar.gz
List groups on Dashboard#projects page
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r--app/controllers/dashboard_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index 23da2c274dc..33b2a5cd7e7 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -33,9 +33,13 @@ class DashboardController < ApplicationController
current_user.owned_projects
else
current_user.authorized_projects
- end.sorted_by_activity
+ end
+
+ @projects = @projects.where(namespace_id: Group.find_by_name(params[:group])) if params[:group].present?
+ @projects = @projects.includes(:namespace).sorted_by_activity
@labels = current_user.authorized_projects.tags_on(:labels)
+ @groups = current_user.authorized_groups
@projects = @projects.tagged_with(params[:label]) if params[:label].present?
@projects = @projects.page(params[:page]).per(30)