2011-10-08 23:36:38 +02:00
|
|
|
- if can? current_user, :admin_team_member, @project
|
|
|
|
%div#new-member-holder
|
2011-12-08 00:35:57 +01:00
|
|
|
.right= link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "grey-button"
|
2011-12-30 07:54:42 +01:00
|
|
|
.clear
|
2011-11-21 08:26:10 +01:00
|
|
|
%br
|
2011-10-08 23:36:38 +02:00
|
|
|
%table.round-borders#team-table
|
2011-11-01 21:11:24 +01:00
|
|
|
%thead
|
2011-10-08 23:36:38 +02:00
|
|
|
%th Name
|
2011-12-07 00:27:07 +01:00
|
|
|
%th Project
|
|
|
|
%th Repository
|
2011-10-08 23:36:38 +02:00
|
|
|
- if can? current_user, :admin_team_member, @project
|
|
|
|
%th Actions
|
|
|
|
- @project.users_projects.each do |up|
|
|
|
|
= render(:partial => 'team_members/show', :locals => {:member => up})
|
|
|
|
|
|
|
|
:javascript
|
2011-12-07 00:27:07 +01:00
|
|
|
$(function(){
|
2011-12-07 09:04:57 +01:00
|
|
|
$('#team-table .repo-access-select, #team-table .project-access-select').live("change", function() {
|
2011-12-07 00:27:07 +01:00
|
|
|
$(this.form).submit();
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
2011-10-26 15:46:25 +02:00
|
|
|
$('.delete-team-member').live('ajax:success', function() {
|
|
|
|
$(this).closest('tr').fadeOut(); });
|