index.html.haml 1.3 KB
Newer Older
1
- page_title "Members"
2

3
.group-members-page.prepend-top-default
4 5 6 7 8
  - if current_user && current_user.can?(:admin_group_member, @group)
    .panel.panel-default
      .panel-heading
        Add new user to group
      .panel-body
9 10
        %p.light
          Members of group have access to all group projects.
11 12
        .new-group-member-holder
          = render "new_group_member"
13

14
    = render 'shared/members/requests', membership_source: @group, members: @members.request
15

16 17 18 19 20 21
  .panel.panel-default
    .panel-heading
      %strong #{@group.name}
      group members
      %small
        (#{@members.total_count})
22
      .controls
23 24 25
        = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form'  do
          .form-group
            = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control', spellcheck: false }
26
          = button_tag class: 'btn', title: 'Search' do
27 28
            = icon("search")
    %ul.content-list
29 30
      = render partial: 'shared/members/member', collection: @members.non_request, as: :member
    = paginate @members.non_request, theme: 'gitlab'
31

32 33 34 35 36
:javascript
  $('form.member-search-form').on('submit', function(event) {
    event.preventDefault();
    Turbolinks.visit(this.action + '?' + $(this).serialize());
  });