BigW Consortium Gitlab

members.html.haml 1.37 KB
Newer Older
1
- show_roles = should_user_see_group_roles?(current_user, @group)
2 3
%h3.page-title
  Group members
4 5 6 7
- if show_roles
  %p.light
    Members of group have access to all group projects.
    Read more about permissions
8
    %strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink"
9

10
%hr
11

12
.clearfix.js-toggle-container
13 14
  = form_tag members_group_path(@group), method: :get, class: 'form-inline member-search-form'  do
    .form-group
15
      = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input input-mn-300' }
16 17
    = submit_tag 'Search', class: 'btn'

18
  - if current_user && current_user.can?(:manage_group, @group)
19
    .pull-right
20
      = link_to '#', class: 'btn btn-new js-toggle-button' do
21 22 23
        Add members
        %i.icon-chevron-down

24
    .js-toggle-content.hide.new-group-member-holder
25 26
      = render "new_group_member"

27
.panel.panel-default.prepend-top-20
28
  .panel-heading
29 30 31
    %strong #{@group.name}
    group members
    %small
32
      (#{@members.total_count})
33 34
  %ul.well-list
    - @members.each do |member|
35
      = render 'users_groups/users_group', member: member, show_roles: show_roles, show_controls: true
36 37 38 39 40 41
= paginate @members, theme: 'gitlab'

:coffeescript
  $('form.member-search-form').on 'submit', (event) ->
    event.preventDefault()
    Turbolinks.visit @.action + '?' + $(@).serialize()