_team_member.html.haml 1.23 KB
Newer Older
gitlabhq's avatar
gitlabhq committed
1
- user = member.user
2
- allow_admin = can? current_user, :admin_project, @project
3
%li{id: dom_id(user), class: "team_member_row user_#{user.id}"}
4
  .row
5
    .span4
6 7
      = link_to user, title: user.name, class: "dark" do
        = image_tag gravatar_icon(user.email, 32), class: "avatar s32"
8 9
        %strong= truncate(user.name, lenght: 40)
        %br
10
        %small.cgray= user.username
11

12
    .span4.pull-right
13 14
      - if allow_admin
        .left
15
          = form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f|
16
            = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit"
17
      .pull-right
18
        - if current_user == user
19
          %span.label.label-success This is you!
20
        - if @project.namespace_owner == user
21
          %span.label.label-info Owner
22
        - elsif user.blocked?
23
          %span.label.label-error Blocked
24
        - elsif allow_admin
25
          = link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do
26
            %i.icon-minus.icon-white
27