summaryrefslogtreecommitdiff
path: root/app/views/projects/project_members/index.html.haml
blob: 82809bec5b81f49754c11d384e0e26e491b96e34 (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
- page_title "Members"
= render "header_title"

.gray-content-block.top-block
  .clearfix.js-toggle-container
    = form_tag namespace_project_project_members_path(@project.namespace, @project), 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 search-text-input', spellcheck: false }
      = button_tag 'Search', class: 'btn'

    - if can?(current_user, :admin_project_member, @project)
      %span.pull-right
        = button_tag class: 'btn btn-new btn-grouped js-toggle-button', type: 'button' do
          Add members
          %i.fa.fa-chevron-down
        = link_to import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-grouped", title: "Import members from another project" do
          Import members

      .js-toggle-content.hide.new-group-member-holder
        = render "new_project_member"

%p.prepend-top-default.light
  Users with access to this project are listed below.
  Read more about project permissions
  %strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink"

= render "team", members: @project_members

- if @group
  = render "group_members", members: @group_members

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