diff options
-rw-r--r-- | app/assets/stylesheets/gl_bootstrap.scss | 6 | ||||
-rw-r--r-- | app/controllers/admin/groups_controller.rb | 2 | ||||
-rw-r--r-- | app/views/admin/groups/show.html.haml | 23 |
3 files changed, 22 insertions, 9 deletions
diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss index 3bff2156c33..514ab8cdfa4 100644 --- a/app/assets/stylesheets/gl_bootstrap.scss +++ b/app/assets/stylesheets/gl_bootstrap.scss @@ -253,6 +253,12 @@ ul.breadcrumb { } } + .panel-footer { + .pagination { + margin: 0; + } + } + &.panel-small { .panel-heading { padding: 6px 15px; diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index 4bb3cf07da0..1a523d081dd 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -8,6 +8,8 @@ class Admin::GroupsController < Admin::ApplicationController end def show + @members = @group.members.order("group_access DESC").page(params[:members_page]).per(30) + @projects = @group.projects.page(params[:projects_page]).per(30) end def new diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 183203aac75..b8068886be2 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -31,11 +31,12 @@ .panel.panel-default .panel-heading - Projects - %small - (#{@group.projects.count}) + %h3.panel-title + Projects + %span.badge + #{@group.projects.count} %ul.well-list - - @group.projects.sort_by(&:name).each do |project| + - @projects.each do |project| %li %strong = link_to project.name_with_namespace, [:admin, project] @@ -43,6 +44,8 @@ = repository_size(project) %span.pull-right.light %span.monospace= project.path_with_namespace + ".git" + .panel-footer + = paginate @projects, param_name: 'projects_page', theme: 'gitlab' .col-md-6 .panel.panel-default @@ -62,12 +65,12 @@ = submit_tag 'Add users into group', class: "btn btn-create" .panel.panel-default .panel-heading - %strong #{@group.name} - Group Members - %small - (#{@group.users_groups.count}) + %h3.panel-title + Members + %span.badge + #{@group.users_groups.count} %ul.well-list.group-users-list - - @group.users_groups.order('group_access DESC').each do |member| + - @members.each do |member| - user = member.user %li{class: dom_class(user)} .list-item-name @@ -77,3 +80,5 @@ = member.human_access = link_to group_users_group_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do %i.icon-minus.icon-white + .panel-footer + = paginate @members, param_name: 'members_page', theme: 'gitlab' |