2011-10-08 23:36:38 +02:00
|
|
|
- user = member.user
|
2011-12-07 00:27:07 +01:00
|
|
|
- allow_admin = can? current_user, :admin_project, @project
|
2012-08-11 00:07:50 +02:00
|
|
|
%tr{id: dom_id(member), class: "team_member_row user_#{user.id}"}
|
2012-09-10 08:13:45 +02:00
|
|
|
%td.span6
|
2012-08-11 00:07:50 +02:00
|
|
|
= link_to project_team_member_path(@project, member), title: user.name, class: "dark" do
|
2012-08-21 20:26:56 +02:00
|
|
|
= image_tag gravatar_icon(user.email, 40), class: "avatar s32"
|
2012-08-11 00:07:50 +02:00
|
|
|
= link_to project_team_member_path(@project, member), title: user.name, class: "dark" do
|
|
|
|
%strong= truncate(user.name, lenght: 40)
|
2012-09-10 08:13:45 +02:00
|
|
|
%br
|
|
|
|
%small.cgray= user.email
|
2012-05-24 08:23:25 +02:00
|
|
|
|
2012-09-10 08:13:45 +02:00
|
|
|
%td.span5
|
2012-09-07 09:42:41 +02:00
|
|
|
.right
|
2012-09-10 08:13:45 +02:00
|
|
|
- if current_user == user
|
|
|
|
%span.btn.disabled This is you!
|
2012-09-07 09:42:41 +02:00
|
|
|
- if @project.owner == user
|
2012-09-10 08:13:45 +02:00
|
|
|
%span.btn.disabled.success Owner
|
|
|
|
- elsif user.blocked
|
2012-09-07 09:42:41 +02:00
|
|
|
%span.btn.disabled.blocked Blocked
|
2012-09-10 08:13:45 +02:00
|
|
|
- elsif allow_admin
|
|
|
|
= link_to project_team_member_path(project_id: @project, id: member.id), confirm: remove_from_team_message(@project, member), method: :delete, class: "very_small btn danger" do
|
|
|
|
%i.icon-minus.icon-white
|
|
|
|
|
2012-09-07 09:42:41 +02:00
|
|
|
- if allow_admin
|
|
|
|
= form_for(member, as: :team_member, url: project_team_member_path(@project, member)) do |f|
|
2012-09-10 08:13:45 +02:00
|
|
|
= f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2"
|