gitlabhq/app/views/teams/members/_show.html.haml

32 lines
1.4 KiB
Plaintext
Raw Normal View History

2013-01-19 18:47:08 +01:00
- user = member.user
- allow_admin = can? current_user, :manage_user_team, @team
2013-01-19 18:47:08 +01:00
%li{id: dom_id(member), class: "team_member_row user_#{user.id}"}
.row
.span5
2013-01-24 00:00:56 +01:00
= link_to user_path(user.username), title: user.name, class: "dark" do
2013-01-19 18:47:08 +01:00
= image_tag gravatar_icon(user.email, 40), class: "avatar s32"
2013-01-24 00:00:56 +01:00
= link_to user_path(user.username), title: user.name, class: "dark" do
2013-01-19 18:47:08 +01:00
%strong= truncate(user.name, lenght: 40)
%br
%small.cgray= user.email
2013-01-30 15:40:43 +01:00
.span6.pull-right
2013-01-19 18:47:08 +01:00
- if allow_admin
.left.span2
= 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 project-access-select span2"
2013-01-19 18:47:08 +01:00
.left.span2
%span
= check_box_tag :group_admin, true, @team.admin?(user)
2013-01-29 21:18:19 +01:00
Admin access
2013-01-30 15:40:43 +01:00
.pull-right
2013-01-19 18:47:08 +01:00
- if current_user == user
%span.btn.disabled This is you!
- if @team.owner == user
2013-01-29 21:29:21 +01:00
%span.btn.disabled.btn-success Owner
2013-01-19 18:47:08 +01:00
- elsif user.blocked
%span.btn.disabled.blocked Blocked
- elsif allow_admin
2013-01-29 21:29:21 +01:00
= link_to team_member_path(@team, user), confirm: remove_from_user_team_message(@team, user), method: :delete, class: "btn-tiny btn btn-remove" do
2013-01-19 18:47:08 +01:00
%i.icon-minus.icon-white