summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps <info@camilstaps.nl>2019-01-28 19:08:18 +0100
committerCamil Staps <info@camilstaps.nl>2019-08-07 20:49:15 +0200
commit2ca4d58165e3c135004b088211aeaf5743065e75 (patch)
tree717f5eb11a4631ab7289d98d3c455f3ca2d67cfd
parentbf3bd577e0fa753b5b7976a73d4c480b45debeac (diff)
downloadgitlab-ce-2ca4d58165e3c135004b088211aeaf5743065e75.tar.gz
Add pagination to {user}/starred view
-rw-r--r--app/controllers/users_controller.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index bc1587e6be0..dc180de1507 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -85,12 +85,14 @@ class UsersController < ApplicationController
def starred
load_starred_projects
+ skip_pagination = Gitlab::Utils.to_boolean(params[:skip_pagination])
+ skip_namespace = Gitlab::Utils.to_boolean(params[:skip_namespace])
+ compact_mode = Gitlab::Utils.to_boolean(params[:compact_mode])
+
respond_to do |format|
format.html { render 'show' }
format.json do
- render json: {
- html: view_to_html_string("shared/projects/_list", projects: @starred_projects)
- }
+ pager_json("shared/projects/_list", @starred_projects.count, projects: @starred_projects, skip_pagination: skip_pagination, skip_namespace: skip_namespace, compact_mode: compact_mode)
end
end
end