Commit 144212fb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add members paginations to admin/project page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 9a4c8f7e
......@@ -17,6 +17,8 @@ class Admin::ProjectsController < Admin::ApplicationController
end
def show
@group_members = @group.members.order("group_access DESC").page(params[:group_members_page]).per(30)
@project_members = @project.users_projects.page(params[:project_members_page]).per(30)
end
def transfer
......
......@@ -100,8 +100,10 @@
= link_to admin_group_path(@group), class: 'btn btn-small' do
%i.icon-edit
%ul.well-list
- @group.users_groups.order('group_access DESC').each do |member|
- @group_members.each do |member|
= render 'users_groups/users_group', member: member, show_controls: false
.panel-footer
= paginate @group_members, param_name: 'group_members_page', theme: 'gitlab'
.panel.panel-default
.panel-heading
......@@ -113,7 +115,7 @@
%i.icon-edit
Manage Access
%ul.well-list.team_members
- @project.users_projects.each do |users_project|
- @project_members.each do |users_project|
- user = users_project.user
%li.users_project
.list-item-name
......@@ -126,3 +128,5 @@
%span.light= users_project.human_access
= link_to project_team_member_path(@project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, remote: true, class: "btn btn-small btn-remove" do
%i.icon-remove
.panel-footer
= paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment