32 lines
1.4 KiB
Plaintext
32 lines
1.4 KiB
Plaintext
|
- user = member.user
|
||
|
- allow_admin = can? current_user, :manage_user_team, @user_team
|
||
|
%li{id: dom_id(member), class: "team_member_row user_#{user.id}"}
|
||
|
.row
|
||
|
.span5
|
||
|
= link_to team_member_path(@user_team, user), title: user.name, class: "dark" do
|
||
|
= image_tag gravatar_icon(user.email, 40), class: "avatar s32"
|
||
|
= link_to team_member_path(@user_team, user), title: user.name, class: "dark" do
|
||
|
%strong= truncate(user.name, lenght: 40)
|
||
|
%br
|
||
|
%small.cgray= user.email
|
||
|
|
||
|
.span6.right
|
||
|
- if allow_admin
|
||
|
.left.span2
|
||
|
= form_for(member, as: :team_member, url: team_member_path(@user_team, user)) do |f|
|
||
|
= f.select :permission, options_for_select(UsersProject.access_roles, @user_team.default_projects_access(user)), {}, class: "medium project-access-select span2"
|
||
|
.left.span2
|
||
|
%span
|
||
|
Admin access
|
||
|
= check_box_tag :group_admin
|
||
|
.right
|
||
|
- if current_user == user
|
||
|
%span.btn.disabled This is you!
|
||
|
- if @user_team.owner == user
|
||
|
%span.btn.disabled.success Owner
|
||
|
- elsif user.blocked
|
||
|
%span.btn.disabled.blocked Blocked
|
||
|
- elsif allow_admin
|
||
|
= link_to team_member_path(@user_team, user), confirm: remove_from_team_message(@user_team, user), method: :delete, class: "very_small btn danger" do
|
||
|
%i.icon-minus.icon-white
|