diff options
author | Camil Staps <info@camilstaps.nl> | 2019-01-28 21:08:18 +0300 |
---|---|---|
committer | Camil Staps <info@camilstaps.nl> | 2019-08-07 21:49:15 +0300 |
commit | 2ca4d58165e3c135004b088211aeaf5743065e75 (patch) | |
tree | 717f5eb11a4631ab7289d98d3c455f3ca2d67cfd /app/controllers/users_controller.rb | |
parent | bf3bd577e0fa753b5b7976a73d4c480b45debeac (diff) |
Add pagination to {user}/starred view
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r-- | app/controllers/users_controller.rb | 8 |
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 |