2011-12-15 23:41:46 +01:00
|
|
|
- allow_admin = can? current_user, :admin_project, @project
|
2011-10-21 14:56:37 +02:00
|
|
|
- user = @team_member.user
|
2012-02-18 13:12:48 +01:00
|
|
|
|
2012-04-02 20:13:44 +02:00
|
|
|
.team_member_show
|
|
|
|
.profile_avatar_holder
|
|
|
|
= image_tag gravatar_icon(user.email, 60), :class => "borders"
|
|
|
|
%h3
|
|
|
|
= user.name
|
|
|
|
%small
|
|
|
|
= user.email
|
|
|
|
%hr
|
|
|
|
.back_link
|
2012-03-24 00:01:36 +01:00
|
|
|
%br
|
2012-04-02 20:13:44 +02:00
|
|
|
= link_to team_project_path(@project), :class => "" do
|
|
|
|
← To team list
|
|
|
|
%br
|
|
|
|
.row
|
2012-04-10 07:51:08 +02:00
|
|
|
.span6
|
2012-04-02 20:13:44 +02:00
|
|
|
%table.no-borders
|
|
|
|
%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
|
2012-04-10 07:51:08 +02:00
|
|
|
.span6
|
2012-04-02 20:13:44 +02:00
|
|
|
%table.no-borders
|
|
|
|
%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
|
2012-03-24 00:01:36 +01:00
|
|
|
= 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
|
2012-04-02 20:13:44 +02:00
|
|
|
%hr
|
|
|
|
= render user.recent_events.limit(3)
|
|
|
|
- if can? current_user, :admin_project, @project
|
2012-04-10 07:51:08 +02:00
|
|
|
.form-horizontal
|
|
|
|
.form-actions
|
|
|
|
= link_to 'Remove from team', project_team_member_path(:project_id => @project, :id => @team_member.id), :confirm => 'Are you sure?', :method => :delete, :class => "btn btn-danger"
|
2011-12-15 23:41:46 +01:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$(function(){
|
|
|
|
$('.repo-access-select, .project-access-select').live("change", function() {
|
|
|
|
$(this.form).submit();
|
|
|
|
});
|
|
|
|
})
|
2011-10-21 14:56:37 +02:00
|
|
|
|