socialforge/app/views/student_work/edit.html.erb

63 lines
2.5 KiB
Plaintext

<div class="homepageRightBanner mb10">
<div class="NewsBannerName">编辑作品</div>
</div>
<div class="cl"></div>
<div class="HomeWork" id="users_setting">
<div class="HomeWorkBox">
<div class="">
<div class="homepagePostTitle fl">
<%= @homework.name%>(作业名称)
</div>
<span class="fr c_grey">
截止时间:<%= @homework.end_time%>
</span>
<div class="cl"></div>
<a href="javascript:void(0);" class="c_blue">
<%= link_to @homework.user.show_name, user_activities_path(@homework.user_id), :class => "c_blue"%>
</a>
<div class="cl"></div>
<div class="HomeWorkP">
<%= @homework.description.html_safe %>
</div>
</div>
</div><!----HomeWorkBox end-->
<div class="cl"></div>
<div class="HomeWorkCon mt15">
<%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
<div class=" c_red mb10">
提示:作品名称和描述中不要出现真实的姓名信息
</div>
<div class="cl"></div>
<div>
<input type="text" name="student_work[name]" id="student_work_name" placeholder="请简洁的概括作品的功能或特性" class="InputBox W700" maxlength="200" onkeyup="regexStudentWorkName();" value="<%= @work.name%>">
<div class="cl"></div>
<p id="student_work_name_span" class="c_red mb10"></p>
</div>
<div class="mt10">
<textarea name="student_work[description]" id="student_work_description" placeholder="请介绍你的作品" class="InputBox W700 H150" maxlength="6000" onkeyup="regexStudentWorkDescription();"><%= @work.description%></textarea>
<script>
var text = document.getElementById("student_work_description");
autoTextarea(text);// 调用
</script>
<div class="cl"></div>
<p id="student_work_description_textarea" class="c_red mb10"></p>
</div>
<div id="homework_attachments">
<%= render :partial => 'users/user_homework_attachment', :locals => {:container => @work, :has_program=>false} %>
</div>
<div class="mt5">
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="edit_student_work(<%= @work.id%>);">确定</a>
<span class="fr mr10 mt3">或</span>
<%= link_to "取消", student_work_index_path(:homework => @homework), :class => "fr mr10 mt3"%>
</div>
<div class="cl"></div>
<% end%>
</div><!----HomeWorkCon end-->
</div>