2015-09-09 16:10:11 +08:00
|
|
|
|
<!-- 此界面只用来新建匿评作业作品 -->
|
2015-06-25 15:55:57 +08:00
|
|
|
|
<script type="text/javascript">
|
2015-09-11 10:44:10 +08:00
|
|
|
|
<%if @homework.homework_detail_manual.comment_status != 1%>
|
2015-06-25 15:55:57 +08:00
|
|
|
|
$(function(){
|
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/new_student_work_alert') %>');
|
|
|
|
|
showModal('ajax-modal', '360px');
|
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
|
|
|
|
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
2015-09-21 17:11:45 +08:00
|
|
|
|
$('#ajax-modal').parent().css("top","65%").css("left","60%");
|
2015-06-25 15:55:57 +08:00
|
|
|
|
$('#ajax-modal').parent().addClass("anonymos_work");
|
|
|
|
|
});
|
|
|
|
|
<% end%>
|
2015-09-11 10:44:10 +08:00
|
|
|
|
|
2015-09-15 16:11:55 +08:00
|
|
|
|
//快速创建项目的弹框
|
|
|
|
|
function new_project(){
|
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/new_project') %>');
|
|
|
|
|
showModal('ajax-modal', '800px');
|
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
|
|
|
|
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
|
|
|
|
$('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed");
|
|
|
|
|
}
|
2015-10-12 16:26:47 +08:00
|
|
|
|
|
|
|
|
|
// 点击 checkbox选中引用的资源的时候,保存该资源的id到session里去
|
|
|
|
|
function store_seleted_resource(dom){
|
|
|
|
|
if(dom.attr('checked') == 'checked' ){
|
|
|
|
|
$.get(
|
|
|
|
|
'<%= store_selected_resource_user_path(User.current) %>'+'?save=y&res_id='+dom.val()
|
|
|
|
|
)
|
|
|
|
|
}else {
|
|
|
|
|
$.get(
|
|
|
|
|
'<%= store_selected_resource_user_path(User.current) %>'+'?save=n&res_id='+dom.val()
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-06-25 15:55:57 +08:00
|
|
|
|
</script>
|
2015-08-28 12:04:49 +08:00
|
|
|
|
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<div class="homepageRightBanner mb10">
|
|
|
|
|
<div class="NewsBannerName">提交作品</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-08-28 12:04:49 +08:00
|
|
|
|
|
2015-09-09 17:50:49 +08:00
|
|
|
|
<div class="HomeWork" id="users_setting">
|
2015-08-29 11:59:52 +08:00
|
|
|
|
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<div class="HomeWorkBox">
|
|
|
|
|
<div class="">
|
|
|
|
|
<div class="homepagePostTitle fl">
|
|
|
|
|
<%= @homework.name%>(作业名称)
|
|
|
|
|
</div>
|
|
|
|
|
<span class="fr c_grey">
|
|
|
|
|
截止时间:<%= @homework.end_time%>
|
|
|
|
|
</span>
|
2015-08-29 11:59:52 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<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 %>
|
2015-08-29 11:59:52 +08:00
|
|
|
|
</div>
|
2015-10-27 09:58:19 +08:00
|
|
|
|
<div>
|
|
|
|
|
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
2015-09-09 16:10:11 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div><!----HomeWorkBox end-->
|
|
|
|
|
<div class="cl"></div>
|
2015-08-29 11:59:52 +08:00
|
|
|
|
|
2015-09-09 16:50:46 +08:00
|
|
|
|
<div class="HomeWorkCon mt15">
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<%= form_for(@student_work,
|
|
|
|
|
:html => { :multipart => true },
|
|
|
|
|
:url => {:controller => 'student_work',
|
|
|
|
|
:action => 'create',
|
|
|
|
|
:homework => @homework.id
|
2015-11-05 14:47:29 +08:00
|
|
|
|
},:remote=>true ) do |f| %>
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<div class=" c_red mb10">
|
2015-09-09 16:50:46 +08:00
|
|
|
|
提示:作品名称和描述中不要出现真实的姓名信息
|
2015-09-09 16:10:11 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-09-02 19:41:45 +08:00
|
|
|
|
|
2015-09-09 16:50:46 +08:00
|
|
|
|
<div>
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<%= f.text_field "name", :required => true, :size => 60, :class => "InputBox W700", :maxlength => 200, :placeholder => "请简洁的概括作品的功能或特性", :onkeyup => "regexStudentWorkName();" %>
|
|
|
|
|
<div class="cl"></div>
|
2015-09-09 16:50:46 +08:00
|
|
|
|
<p id="student_work_name_span" class="c_red mb10"></p>
|
2015-09-09 16:10:11 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="mt10">
|
|
|
|
|
<%= f.text_area "description", :class => "InputBox W700 H150", :placeholder => "请介绍你的作品", :onkeyup => "regexStudentWorkDescription();"%>
|
2015-09-09 16:50:46 +08:00
|
|
|
|
<script>
|
|
|
|
|
var text = document.getElementById("student_work_description");
|
|
|
|
|
autoTextarea(text);// 调用
|
|
|
|
|
</script>
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-09-09 16:50:46 +08:00
|
|
|
|
<p id="student_work_description_textarea" class="c_red mb10"></p>
|
2015-08-28 12:04:49 +08:00
|
|
|
|
</div>
|
2015-08-28 15:08:07 +08:00
|
|
|
|
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<div id="homework_attachments">
|
2015-11-11 16:32:13 +08:00
|
|
|
|
<%= render :partial => 'users/user_homework_attachment', :locals => {:container => @student_work, :has_program=>false} %>
|
2015-09-09 16:10:11 +08:00
|
|
|
|
</div>
|
2015-08-28 12:04:49 +08:00
|
|
|
|
|
2015-09-15 15:18:33 +08:00
|
|
|
|
<div class="mt5 fl">
|
|
|
|
|
<a href="javascript:void(0);" class="RalationIcon fl mt3" onclick="show_project();">关联项目</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
<div class="mt10 none" id="about_project">
|
|
|
|
|
<%= select_tag :project_id, options_for_select(user_projects_option, @student_work.project_id), {:class => "InputBox W680 fl"} %>
|
2015-09-15 16:11:55 +08:00
|
|
|
|
<%#=link_to "", new_project_path, :class => "ml5 mt5 SetUpIcon fl", :title => "快速创建"%>
|
|
|
|
|
<a class=" ml5 mt5 SetUpIcon fl" href="javascript:void(0)" title="快速创建" onclick="new_project();"></a>
|
2015-09-15 15:18:33 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<div class="mt5">
|
2015-11-11 16:32:13 +08:00
|
|
|
|
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="popupRegex();new_student_work();">确定</a>
|
2015-09-09 16:10:11 +08:00
|
|
|
|
<span class="fr mr10 mt3">或</span>
|
2015-11-11 16:32:13 +08:00
|
|
|
|
<%= link_to "取消", user_homeworks_user_path(User.current.id), :class => "fr mr10 mt3"%>
|
2015-09-09 16:10:11 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% end%>
|
|
|
|
|
</div><!----HomeWorkCon end-->
|
2015-11-09 11:16:19 +08:00
|
|
|
|
</div>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
function popupRegex(){
|
|
|
|
|
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
|
|
|
|
|
showModal('ajax-modal', '500px');
|
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
|
$('#ajax-modal').parent().css("top","").css("left","");
|
|
|
|
|
$('#ajax-modal').parent().addClass("anonymos");
|
|
|
|
|
}
|
|
|
|
|
</script>
|