64 lines
1.6 KiB
Plaintext
64 lines
1.6 KiB
Plaintext
- allow_admin = can? current_user, :admin_project, @project
|
|
- user = @team_member.user
|
|
.media-grid
|
|
= link_to "#" do
|
|
= image_tag gravatar_icon(user.email, 60), :class => "thumbnail", :width => 60
|
|
%h3.media_h
|
|
= user.name
|
|
%br
|
|
%small= user.email
|
|
|
|
.back_link
|
|
= link_to team_project_path(@project), :class => "" do
|
|
← To team list
|
|
|
|
%br
|
|
%table.zebra-striped.borders
|
|
%tr
|
|
%td Name
|
|
%td= user.name
|
|
|
|
%tr
|
|
%td Email
|
|
%td= user.email
|
|
|
|
%tr
|
|
%td Member since
|
|
%td= @team_member.created_at.stamp("Aug 21, 2011")
|
|
|
|
%tr
|
|
%td
|
|
Project Access
|
|
(#{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
|
|
|
|
- unless user.skype.empty?
|
|
%tr
|
|
%td Skype:
|
|
%td= user.skype
|
|
|
|
- unless user.linkedin.empty?
|
|
%tr
|
|
%td LinkedIn:
|
|
%td= user.linkedin
|
|
|
|
- unless user.twitter.empty?
|
|
%tr
|
|
%td Twitter:
|
|
%td= user.twitter
|
|
|
|
- if can? current_user, :admin_project, @project
|
|
.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 danger"
|
|
|
|
:javascript
|
|
$(function(){
|
|
$('.repo-access-select, .project-access-select').live("change", function() {
|
|
$(this.form).submit();
|
|
});
|
|
})
|
|
|