2011-10-08 23:36:38 +02:00
|
|
|
- user = member.user
|
|
|
|
%tr{:id => dom_id(member)}
|
|
|
|
%td
|
2011-10-21 14:56:37 +02:00
|
|
|
= link_to image_tag(gravatar_icon(user.email), :class => "left", :width => 40, :style => "padding:0 5px;"), project_team_member_path(@project, member)
|
|
|
|
|
2011-11-30 22:41:00 +01:00
|
|
|
= link_to truncate(user.name, :lenght => 24), project_team_member_path(@project, member)
|
|
|
|
%br
|
|
|
|
.cgray{:style => "padding-top:10px;"}= truncate user.email, :lenght => 24
|
2011-10-08 23:36:38 +02:00
|
|
|
- if can? current_user, :admin_project, @project
|
2011-10-26 15:46:25 +02:00
|
|
|
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
|
2011-10-08 23:36:38 +02:00
|
|
|
%td= f.check_box :read, :onclick => "$(this.form).submit();"
|
|
|
|
%td= f.check_box :write, :onclick => "$(this.form).submit();"
|
|
|
|
%td= f.check_box :admin, :onclick => "$(this.form).submit();"
|
2011-10-26 15:46:25 +02:00
|
|
|
- else
|
2011-10-08 23:36:38 +02:00
|
|
|
%td= check_box_tag "read", 1, member.read, :disabled => :disabled
|
|
|
|
%td= check_box_tag "commit", 1, member.write, :disabled => :disabled
|
|
|
|
%td= check_box_tag "admin", 1, member.admin, :disabled => :disabled
|
|
|
|
- if can? current_user, :admin_team_member, @project
|
|
|
|
%td
|
2011-11-21 08:26:10 +01:00
|
|
|
= link_to 'Cancel', project_team_member_path(:project_id => @project, :id => member.id), :confirm => 'Are you sure?', :method => :delete, :class => "grey-button negative delete-team-member", :remote => true
|