diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-26 19:46:31 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-26 19:46:31 +0300 |
commit | 5e843a176982ed78cc2a6cf28618839e130cf608 (patch) | |
tree | 7d4489206f2e23ee55ebccf437a138eff0b38d3e /app/controllers/dashboard_controller.rb | |
parent | a85c58c736911b9b98c11fbf44391b43b0c91611 (diff) | |
download | gitlab-ce-5e843a176982ed78cc2a6cf28618839e130cf608.tar.gz |
Explain on dashboard that limit amount of projects displayed
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r-- | app/controllers/dashboard_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 33b2a5cd7e7..ac319384434 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -5,10 +5,14 @@ class DashboardController < ApplicationController before_filter :event_filter, only: :show def show + # Fetch only 30 projects. + # If user needs more - point to Dashboard#projects page + @projects_limit = 30 + @groups = current_user.authorized_groups.sort_by(&:human_name) @has_authorized_projects = @projects.count > 0 @projects_count = @projects.count - @projects = @projects.limit(20) + @projects = @projects.limit(@projects_limit) @events = Event.in_projects(current_user.authorized_projects.pluck(:id)) @events = @event_filter.apply_filter(@events) |