gitlab-org--gitlab-foss/app/views/teams/members/show.html.haml
2013-01-30 16:40:43 +02:00

60 lines
1.8 KiB
Text

- allow_admin = can? current_user, :admin_project, @project
- user = @team_member.user
.team_member_show
- if can? current_user, :admin_project, @project
= link_to 'Remove from team', project_team_member_path(project_id: @project, id: @team_member.id), confirm: 'Are you sure?', method: :delete, class: "pull-right btn btn-remove"
.profile_avatar_holder
= image_tag gravatar_icon(user.email, 60), class: "borders"
%h3.page_title
= user.name
%small (@#{user.username})
%hr
.back_link
%br
= link_to project_team_index_path(@project), class: "" do
← To team list
%br
.row
.span6
%table.lite
%tr
%td Email
%td= mail_to user.email
%tr
%td Skype
%td= user.skype
- unless user.linkedin.blank?
%tr
%td LinkedIn
%td= user.linkedin
- unless user.twitter.blank?
%tr
%td Twitter
%td= user.twitter
- unless user.bio.blank?
%tr
%td Bio
%td= user.bio
.span6
%table.lite
%tr
%td Member since
%td= @team_member.created_at.stamp("Aug 21, 2011")
%tr
%td
Project Access:
%small (#{link_to "read more", help_permissions_path, class: "vlink"})
%td
= form_for(@team_member, as: :team_member, url: project_team_member_path(@project, @team_member)) do |f|
= f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, class: "project-access-select", disabled: !allow_admin
%hr
= render @events
:javascript
$(function(){
$('.repo-access-select, .project-access-select').live("change", function() {
$(this.form).submit();
});
})