summaryrefslogtreecommitdiff
path: root/app/views/groups/group_members/index.html.haml
blob: c83766e729a98d7646d626ffae26d7a10b576735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
- page_title "Members"
- header_title group_title(@group, "Members", group_group_members_path(@group))
- @blank_container = true

.group-members-page
  - if current_user && current_user.can?(:admin_group_member, @group)
    .panel.panel-default
      .panel-heading
        Add new user to group
      .panel-body
        - if should_user_see_group_roles?(current_user, @group)
          %p.light
            Members of group have access to all group projects.
        .new-group-member-holder
          = render "new_group_member"

  .panel.panel-default
    .panel-heading
      %strong #{@group.name}
      group members
      %small
        (#{@members.total_count})
      .pull-right
        = 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 }
          = button_tag class: 'btn' do
            = icon("search")
    %ul.content-list
      - @members.each do |member|
        = render 'groups/group_members/group_member', member: member, show_controls: true
    = paginate @members, theme: 'gitlab'

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