创建作品

<%= form_for(@stundet_work, :html => { :multipart => true }, :url => {:controller => 'student_work', :action => 'create', :homework => @homework.id }) do |f|%>
<% if @homework.homework_type == 1%>
提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
<% end%>

<%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %> <% if @homework.homework_type != 2%> 项目信息 <% end%>

<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>

<% if @homework.homework_type == 2 && @homework.homework_detail_programing%> <%= f.text_area "description", :class => "w620 hwork_txt h400", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => @homework.homework_detail_programing.language == "1" ? c_stantard_code_student : c_stantard_code_student_%> <% else %> <%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%> <% end%>

<% if @homework.homework_type != 2%>

<%= render :partial => 'attachments/new_form' %>

<% end%>

提交作品 <%= link_to "返  回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>

<% end%>