2013-01-19 12:47:08 -05:00
|
|
|
- user = member.user
|
2013-01-22 17:20:27 -05:00
|
|
|
- allow_admin = can? current_user, :manage_user_team, @team
|
2013-01-19 12:47:08 -05:00
|
|
|
%li{id: dom_id(member), class: "team_member_row user_#{user.id}"}
|
|
|
|
.row
|
|
|
|
.span5
|
2013-01-23 18:00:56 -05:00
|
|
|
= link_to user_path(user.username), title: user.name, class: "dark" do
|
2013-01-19 12:47:08 -05:00
|
|
|
= image_tag gravatar_icon(user.email, 40), class: "avatar s32"
|
2013-01-23 18:00:56 -05:00
|
|
|
= link_to user_path(user.username), title: user.name, class: "dark" do
|
2013-01-19 12:47:08 -05:00
|
|
|
%strong= truncate(user.name, lenght: 40)
|
|
|
|
%br
|
2013-03-13 13:16:36 -04:00
|
|
|
%small.cgray= user.username
|
2013-01-19 12:47:08 -05:00
|
|
|
|
2013-02-18 09:40:11 -05:00
|
|
|
.span4
|
2013-01-19 12:47:08 -05:00
|
|
|
- if allow_admin
|
2013-02-18 09:40:11 -05:00
|
|
|
= form_for(member, as: :team_member, url: team_member_path(@team, user)) do |f|
|
|
|
|
= f.select :permission, options_for_select(UsersProject.access_roles, @team.default_projects_access(user)), {}, class: "medium trigger-submit"
|
|
|
|
%br
|
|
|
|
= label_tag do
|
|
|
|
= f.check_box :group_admin, class: 'trigger-submit'
|
|
|
|
%span Admin access
|
|
|
|
.pull-right
|
|
|
|
- if current_user == user
|
|
|
|
%span.btn.disabled This is you!
|
|
|
|
- if @team.owner == user
|
|
|
|
%span.btn.disabled Owner
|
2013-03-04 09:52:30 -05:00
|
|
|
- elsif user.blocked?
|
2013-02-18 09:40:11 -05:00
|
|
|
%span.btn.disabled.blocked Blocked
|
|
|
|
- elsif allow_admin
|
2013-02-22 11:26:33 -05:00
|
|
|
= link_to team_member_path(@team, user), confirm: remove_from_user_team_message(@team, user), method: :delete, class: "btn-tiny btn btn-remove", title: "Remove from team" do
|
2013-02-18 09:40:11 -05:00
|
|
|
%i.icon-minus.icon-white
|