summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-01-16 14:43:52 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-01-16 14:43:52 +0000
commitd3561721656dd8c289999a4bc84b64d0c20ddf43 (patch)
tree3f8b3f961df5016f5996e8180e949ef3d652834a /app/controllers
parentaeb11d153e18a9a7adef30f49afa156fa6b0e3a5 (diff)
parent25dcce0aa78ea3ba8c26b451961909f70b15e593 (diff)
downloadgitlab-ce-d3561721656dd8c289999a4bc84b64d0c20ddf43.tar.gz
Merge branch 'add-badge-count-to-projects-and-groups' into 'master'
Add badge count to projects Closes #29798 See merge request gitlab-org/gitlab-ce!18425
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/dashboard/projects_controller.rb3
-rw-r--r--app/controllers/explore/projects_controller.rb3
2 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/dashboard/projects_controller.rb b/app/controllers/dashboard/projects_controller.rb
index f073b6de444..b1d224d026f 100644
--- a/app/controllers/dashboard/projects_controller.rb
+++ b/app/controllers/dashboard/projects_controller.rb
@@ -53,6 +53,9 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def load_projects(finder_params)
+ @total_user_projects_count = ProjectsFinder.new(params: { non_public: true }, current_user: current_user).execute
+ @total_starred_projects_count = ProjectsFinder.new(params: { starred: true }, current_user: current_user).execute
+
projects = ProjectsFinder
.new(params: finder_params, current_user: current_user)
.execute
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb
index 778fdda8dbd..9f074690cbc 100644
--- a/app/controllers/explore/projects_controller.rb
+++ b/app/controllers/explore/projects_controller.rb
@@ -55,6 +55,9 @@ class Explore::ProjectsController < Explore::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord
def load_projects
+ @total_user_projects_count = ProjectsFinder.new(params: { non_public: true }, current_user: current_user).execute
+ @total_starred_projects_count = ProjectsFinder.new(params: { starred: true }, current_user: current_user).execute
+
projects = ProjectsFinder.new(current_user: current_user, params: params)
.execute
.includes(:route, :creator, :group, namespace: [:route, :owner])