diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-02 20:31:43 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-02 20:31:43 +0400 |
commit | 144212fba27b688d0e3a12ea6092c4f4c7b89da9 (patch) | |
tree | cbde005ad9920e74e9358aafb003ffca9b1443b6 /app | |
parent | 9a4c8f7e41eaec63d98431f5ff776240e2dc7604 (diff) |
Add members paginations to admin/project page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/views/admin/projects/show.html.haml | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 92ef5963373..097d208f313 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -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 diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 3f25eb7fdb9..66a72449f40 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -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' |