2011-12-15 23:41:46 +01:00
|
|
|
- allow_admin = can? current_user, :admin_project, @project
|
2012-02-18 13:12:48 +01:00
|
|
|
|
2012-04-02 20:13:44 +02:00
|
|
|
.team_member_show
|
2012-07-29 00:40:21 +02:00
|
|
|
- if can? current_user, :admin_project, @project
|
2013-01-29 21:18:19 +01:00
|
|
|
= link_to 'Remove from team', project_team_member_path(@project, @member), confirm: 'Are you sure?', method: :delete, class: "right btn btn-remove"
|
2012-04-02 20:13:44 +02:00
|
|
|
.profile_avatar_holder
|
2013-01-22 18:20:39 +01:00
|
|
|
= image_tag gravatar_icon(@member.email, 60), class: "borders"
|
2012-12-13 20:44:55 +01:00
|
|
|
%h3.page_title
|
2013-01-22 18:20:39 +01:00
|
|
|
= @member.name
|
|
|
|
%small (@#{@member.username})
|
2012-07-29 00:40:21 +02:00
|
|
|
|
2012-04-02 20:13:44 +02:00
|
|
|
%hr
|
|
|
|
.back_link
|
2012-03-24 00:01:36 +01:00
|
|
|
%br
|
2012-09-16 15:21:20 +02:00
|
|
|
= link_to project_team_index_path(@project), class: "" do
|
2012-04-02 20:13:44 +02:00
|
|
|
← To team list
|
|
|
|
%br
|
|
|
|
.row
|
2012-04-10 07:51:08 +02:00
|
|
|
.span6
|
2012-09-03 20:53:16 +02:00
|
|
|
%table.lite
|
2012-04-02 20:13:44 +02:00
|
|
|
%tr
|
|
|
|
%td Email
|
2013-01-22 18:20:39 +01:00
|
|
|
%td= mail_to @member.email
|
2012-04-02 20:13:44 +02:00
|
|
|
%tr
|
|
|
|
%td Skype
|
2013-01-22 18:20:39 +01:00
|
|
|
%td= @member.skype
|
|
|
|
- unless @member.linkedin.blank?
|
2012-04-02 20:13:44 +02:00
|
|
|
%tr
|
|
|
|
%td LinkedIn
|
2013-01-22 18:20:39 +01:00
|
|
|
%td= @member.linkedin
|
|
|
|
- unless @member.twitter.blank?
|
2012-04-02 20:13:44 +02:00
|
|
|
%tr
|
|
|
|
%td Twitter
|
2013-01-22 18:20:39 +01:00
|
|
|
%td= @member.twitter
|
|
|
|
- unless @member.bio.blank?
|
2012-04-02 20:13:44 +02:00
|
|
|
%tr
|
|
|
|
%td Bio
|
2013-01-22 18:20:39 +01:00
|
|
|
%td= @member.bio
|
2012-04-10 07:51:08 +02:00
|
|
|
.span6
|
2012-09-03 20:53:16 +02:00
|
|
|
%table.lite
|
2012-04-02 20:13:44 +02:00
|
|
|
%tr
|
|
|
|
%td Member since
|
2013-01-22 18:20:39 +01:00
|
|
|
%td= @user_project_relation.created_at.stamp("Aug 21, 2011")
|
2012-04-02 20:13:44 +02:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
Project Access:
|
2012-08-11 00:07:50 +02:00
|
|
|
%small (#{link_to "read more", help_permissions_path, class: "vlink"})
|
2012-04-02 20:13:44 +02:00
|
|
|
%td
|
2013-01-22 18:20:39 +01:00
|
|
|
= form_for(@user_project_relation, as: :team_member, url: project_team_member_path(@project, @member)) do |f|
|
|
|
|
= f.select :project_access, options_for_select(Project.access_options, @user_project_relation.project_access), {}, class: "project-access-select", disabled: !allow_admin
|
2012-04-02 20:13:44 +02:00
|
|
|
%hr
|
2012-08-21 07:20:11 +02:00
|
|
|
= render @events
|
2011-12-15 23:41:46 +01:00
|
|
|
:javascript
|
|
|
|
$(function(){
|
2012-06-04 00:37:27 +02:00
|
|
|
$('.repo-access-select, .project-access-select').live("change", function() {
|
2011-12-15 23:41:46 +01:00
|
|
|
$(this.form).submit();
|
|
|
|
});
|
|
|
|
})
|
2011-10-21 14:56:37 +02:00
|
|
|
|