- 创建作品
- <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}) if User.current.allowed_to?(:add_project, nil, :global => true) %>
<%= form_for(HomeworkAttach.new, :method => :post,
:name => 'new_form',
:html => { :multipart => true },
:url => {:controller => 'homework_attach',
:action => 'create',
:user_id => User.current.id,
:bid_id => @bid
}) do |f|%>
<%= f.text_field "name", :required => true, :size => 60, :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onkeyup => "regexHomeworkCommonName();" %>
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :style => "width:430px", :placeholder => "最多3000个汉字", :onkeyup => "regexHomeworkCommonDescription();"%>
添加附件 :
<%= render :partial => 'attachments/form' %>
<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "w350 bo"} %>
<% end %>