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
|
2013-01-22 18:20:39 +01:00
|
|
|
%li{id: dom_id(user), class: "team_member_row user_#{user.id}"}
|
2012-11-30 17:26:17 +01:00
|
|
|
.row
|
2013-02-18 20:10:49 +01:00
|
|
|
.span4
|
2013-01-22 18:20:39 +01:00
|
|
|
= link_to project_team_member_path(@project, user), title: user.name, class: "dark" do
|
2012-11-30 17:26:17 +01:00
|
|
|
= image_tag gravatar_icon(user.email, 40), class: "avatar s32"
|
2013-01-22 18:20:39 +01:00
|
|
|
= link_to project_team_member_path(@project, user), title: user.name, class: "dark" do
|
2012-11-30 17:26:17 +01:00
|
|
|
%strong= truncate(user.name, lenght: 40)
|
|
|
|
%br
|
|
|
|
%small.cgray= user.email
|
2012-05-24 08:23:25 +02:00
|
|
|
|
2013-02-18 20:10:49 +01:00
|
|
|
.span4.pull-right
|
2012-11-30 17:26:17 +01:00
|
|
|
- if allow_admin
|
|
|
|
.left
|
2013-01-22 18:20:39 +01:00
|
|
|
= form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f|
|
2013-02-18 20:21:24 +01:00
|
|
|
= f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit"
|
2013-01-30 15:40:43 +01:00
|
|
|
.pull-right
|
2012-11-30 17:26:17 +01:00
|
|
|
- if current_user == user
|
2013-02-18 20:10:49 +01:00
|
|
|
%span.label This is you!
|
2012-11-30 17:26:17 +01:00
|
|
|
- if @project.namespace_owner == user
|
2013-02-18 20:10:49 +01:00
|
|
|
%span.label Owner
|
2012-11-30 17:26:17 +01:00
|
|
|
- elsif user.blocked
|
2013-02-18 20:10:49 +01:00
|
|
|
%span.label Blocked
|
2012-11-30 17:26:17 +01:00
|
|
|
- elsif allow_admin
|
2013-01-29 21:29:21 +01:00
|
|
|
= link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn-tiny btn btn-remove" do
|
2012-11-30 17:26:17 +01:00
|
|
|
%i.icon-minus.icon-white
|
2012-09-10 08:13:45 +02:00
|
|
|
|