<%= 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 members.any? %> <% else %>

<%= l(:label_no_data) %>

<% end %>
<% if roles.any? %>
<% 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_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| %> <% end%>
<% end %>