diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-20 16:50:46 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-20 17:12:46 +0300 |
commit | 043522a8aed5e598f3cfe97480a5b169fe0786f3 (patch) | |
tree | 2d9b2bdc56bfa26c2e3fb7d7407ae85186a691f4 /app/views/admin/groups | |
parent | 764c9131d31593cf8508e36db17f6b7bd026f4c0 (diff) |
Display group/project access requesters separately in admin
Also, reuse partials from the non-admin views.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/views/admin/groups')
-rw-r--r-- | app/views/admin/groups/show.html.haml | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 5b8a0262ea0..50770465f07 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -88,28 +88,17 @@ = select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2" %hr = button_tag 'Add users to group', class: "btn btn-create" + + = render 'shared/members/requests', membership_source: @group, members: @members.request + .panel.panel-default .panel-heading - %h3.panel-title - Members - %span.badge - #{@group.group_members.count} - %ul.well-list.group-users-list - - @members.each do |member| - - user = member.user - %li{class: dom_class(member), id: (dom_id(user) if user)} - .list-item-name - - if user - %strong - = link_to user.name, admin_user_path(user) - - else - %strong - = member.invite_email - (invited) - %span.pull-right.light - = member.human_access - - if can?(current_user, :destroy_group_member, member) - = link_to group_group_member_path(@group, member), data: { confirm: remove_member_message(member) }, method: :delete, remote: true, class: "btn-xs btn btn-remove", title: 'Remove user from group' do - %i.fa.fa-minus.fa-inverse + %strong= @group.name + group members + %span.badge= @group.members.non_request.size + .pull-right + = link_to icon('pencil-square-o', text: 'Manage Access'), polymorphic_url([@group, :members]), class: "btn btn-xs" + %ul.well-list.group-users-list.content-list + = render partial: 'shared/members/member', collection: @members.non_request, as: :member, locals: { show_controls: false } .panel-footer - = paginate @members, param_name: 'members_page', theme: 'gitlab' + = paginate @members.non_request, param_name: 'members_page', theme: 'gitlab' |