%= error_messages_for 'member' %>
<%
roles = Role.givable.all
if @project.project_type == Project::ProjectType_course
roles = roles[3..5]
else
roles = roles[0..2]
end
members = @project.member_principals.includes(:roles, :principal).all.sort
%>
<% if @project.applied_projects.any? %>
<%= l(:label_apply_project) %>
<%= form_for(@applied_members, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
<%= render_principals_for_applied_members_new(@project) %>
- <%= l(:label_role_plural) %>:
<% roles.each do |role| %>
-
<%= check_box_tag 'membership[role_ids][]', role.id %>
<% end %>
<%= l(:label_approve) %>
<%= l(:label_refusal) %>
<% end %>
<% end %>
<%= l(:label_member_new) %>
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
<%= render_project_members(@project) %>
-
<%= l(:label_role_plural) %>:
<% roles.each do |role| %>
-
<%= check_box_tag 'membership[role_ids][]', role.id %>
<% end %>
新增成员
<% end%>
<% end %>