Commit c2817e6f authored by randx's avatar randx

Team Member Profile: Remove button rebased

parent 4c1267e0
...@@ -2,12 +2,15 @@ ...@@ -2,12 +2,15 @@
- user = @team_member.user - user = @team_member.user
.team_member_show .team_member_show
- if can? current_user, :admin_project, @project
= link_to 'Remove from team', project_team_member_path(:project_id => @project, :id => @team_member.id), :confirm => 'Are you sure?', :method => :delete, :class => "right btn btn-danger"
.profile_avatar_holder .profile_avatar_holder
= image_tag gravatar_icon(user.email, 60), :class => "borders" = image_tag gravatar_icon(user.email, 60), :class => "borders"
%h3 %h3
= user.name = user.name
%small %small
= user.email = user.email
%hr %hr
.back_link .back_link
%br %br
...@@ -48,12 +51,7 @@ ...@@ -48,12 +51,7 @@
= form_for(@team_member, :as => :team_member, :url => project_team_member_path(@project, @team_member)) do |f| = 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 = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select", :disabled => !allow_admin
%hr %hr
= render user.recent_events.limit(3) = render user.recent_events.limit(5)
- if can? current_user, :admin_project, @project
.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"
:javascript :javascript
$(function(){ $(function(){
$('.repo-access-select, .project-access-select').live("change", function() { $('.repo-access-select, .project-access-select').live("change", function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment