<%if @project%> <% if @project_error_message%> alert("<%= @project_error_message%>"); <% else%> $('#pro_st_tbc_03').html('<%= escape_javascript(render :partial => 'projects/settings/new_members') %>'); hideOnLoad(); $("#project_members_number").html("<%= @project.members.count %>"); alert("<%= @succes_message%>"); <% end%> <%elsif @course%> <% if @create_member_error_messages%> notice_box("<%= @create_member_error_messages%>"); <% else%> <% if params[:membership][:role_ids][0] == '10' %> notice_box_redirect("/courses/<%= @course.id %>/students", "添加成功") <% else %> notice_box_redirect('<%= teachers_course_path(@course) %>',"添加成功"); <% end %> <% end%> hideOnLoad(); <%end%>