diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-23 19:28:14 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-26 12:42:12 +0200 |
commit | f99d8786b74cbd8d37308217b914bceaccbdc71d (patch) | |
tree | f35de5a0f70ba1c8d71b7e2d897ae79abfc5e46e /app | |
parent | fca610e5cbf5382f3814120227a0ca11440c8a9f (diff) | |
download | gitlab-ce-f99d8786b74cbd8d37308217b914bceaccbdc71d.tar.gz |
Fix snippets pagination22500-can-t-paginate-through-snippets
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/users_controller.rb | 2 | ||||
-rw-r--r-- | app/views/snippets/_snippets.html.haml | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a4bedb3bfe6..838ecc837e4 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -65,7 +65,7 @@ class UsersController < ApplicationController format.html { render 'show' } format.json do render json: { - html: view_to_html_string("snippets/_snippets", collection: @snippets) + html: view_to_html_string("snippets/_snippets", collection: @snippets, remote: true) } end end diff --git a/app/views/snippets/_snippets.html.haml b/app/views/snippets/_snippets.html.haml index 7be4a471579..77b66ca74b6 100644 --- a/app/views/snippets/_snippets.html.haml +++ b/app/views/snippets/_snippets.html.haml @@ -1,3 +1,5 @@ +- remote = local_assigns.fetch(:remote, false) + .snippets-list-holder %ul.content-list = render partial: 'shared/snippets/snippet', collection: @snippets @@ -5,7 +7,7 @@ %li .nothing-here-block Nothing here. - = paginate @snippets, theme: 'gitlab', remote: true + = paginate @snippets, theme: 'gitlab', remote: remote :javascript gl.SnippetsList(); |