show.html.haml 1.73 KB
Newer Older
1
- allow_admin = can? current_user, :admin_project, @project
2
- user = @team_member.user
3

4 5 6 7 8 9 10 11 12 13 14 15 16 17
.row
  .span8
    .profile_avatar_holder
      = image_tag gravatar_icon(user.email, 90), :class => "styled_image"
    %h3
      = user.name
      %br
      %small
        = user.email
    %br
    .back_link
      %br
      = link_to team_project_path(@project), :class => "" do 
        ← To team list
18
  
19 20 21 22 23 24 25 26 27 28 29 30 31
  .span8.right
    %div
      %div
        %h5.cgray
          Member since: 
          %span.right
            = @team_member.created_at.stamp("Aug 21, 2011") 
        %h5.cgray
          Project Access: 
          %small (#{link_to "read more", help_permissions_path, :class => "vlink"})
          %span.right
            = 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
32 33 34



35
%div.prepend-top-20
36
  - unless user.skype.empty?
37 38 39
    %p
      %b Skype:
      = user.skype
40 41

  - unless user.linkedin.empty?
42 43 44
    %p
      %b LinkedIn:
      = user.linkedin
45 46

  - unless user.twitter.empty?
47 48 49 50 51 52 53 54 55 56
    %p
      %b Twitter:
      = user.twitter
    - unless user.bio.empty?
      %p
        %b Bio:
        = user.bio

= render user.recent_events.limit(3)

57 58

- if can? current_user, :admin_project, @project
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
59 60
  .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"
61 62 63 64 65 66 67

:javascript
  $(function(){
    $('.repo-access-select, .project-access-select').live("change", function() { 
      $(this.form).submit();
    });
  })
68