27 lines
1.2 KiB
Text
27 lines
1.2 KiB
Text
- user = member.user
|
|
- allow_admin = can? current_user, :admin_project, @project
|
|
%li{id: dom_id(user), class: "team_member_row user_#{user.id}"}
|
|
.row
|
|
.span4
|
|
= link_to user, title: user.name, class: "dark" do
|
|
= image_tag gravatar_icon(user.email, 32), class: "avatar s32"
|
|
%strong= truncate(user.name, lenght: 40)
|
|
%br
|
|
%small.cgray= user.username
|
|
|
|
.span4.pull-right
|
|
- if allow_admin
|
|
.left
|
|
= form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f|
|
|
= f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit"
|
|
.pull-right
|
|
- if current_user == user
|
|
%span.label.label-success This is you!
|
|
- if @project.namespace_owner == user
|
|
%span.label.label-info Owner
|
|
- elsif user.blocked?
|
|
%span.label.label-error Blocked
|
|
- elsif allow_admin
|
|
= 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
|
|
%i.icon-minus.icon-white
|
|
|