2015-05-21 17:17:54 +08:00
|
|
|
<div class="show_hwork_arrow"></div>
|
|
|
|
<div class="show_hwork">
|
|
|
|
<ul>
|
2015-05-28 15:54:42 +08:00
|
|
|
<li class="fl">
|
2015-05-22 14:45:01 +08:00
|
|
|
<span class="tit_fb">上交时间:</span>
|
2015-05-27 11:25:32 +08:00
|
|
|
<%=format_time @work.created_at %>
|
2015-05-22 14:45:01 +08:00
|
|
|
</li>
|
2015-05-28 15:54:42 +08:00
|
|
|
|
|
|
|
<% if @work.user == User.current %> <!-- 我的作业,显示编辑和删除按钮 -->
|
|
|
|
<li class="fr" >
|
|
|
|
<a href="javascript:void(0);" class=" pic_del" ></a>
|
|
|
|
</li>
|
|
|
|
<li class="fr" >
|
|
|
|
<a href="javascript:void(0);" class=" pic_edit" ></a>
|
|
|
|
</li>
|
|
|
|
<% end%>
|
|
|
|
<% if (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 3) && @work.user != User.current%> <!-- 普通作业或者编程作业,或者是匿评结束阶段,显示点赞按钮 -->
|
2015-05-28 16:10:40 +08:00
|
|
|
<li class="fr" id="student_work_praise_<%= @homework.id%>">
|
|
|
|
<%= render :partial => 'student_work_praise' %>
|
2015-05-28 15:54:42 +08:00
|
|
|
</li>
|
|
|
|
<% end%>
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
2015-05-22 14:45:01 +08:00
|
|
|
<!--<li >-->
|
|
|
|
<!--<span class="tit_fb"> 参与人员:</span>-->
|
|
|
|
<!--程梦雯 王强-->
|
|
|
|
<!--</li>-->
|
2015-05-27 11:25:32 +08:00
|
|
|
<% if @work.project%>
|
2015-05-22 14:45:01 +08:00
|
|
|
<li >
|
|
|
|
<span class="tit_fb"> 关联项目:</span>
|
2015-05-27 11:25:32 +08:00
|
|
|
<%= link_to( @work.project.name, project_path(@work.project.id), :class => "c_blue02" )%>
|
2015-05-22 14:45:01 +08:00
|
|
|
</li>
|
|
|
|
<% end%>
|
|
|
|
<li >
|
|
|
|
<span class="tit_fb ">内容:</span>
|
2015-05-27 17:51:26 +08:00
|
|
|
<p class="show_hwork_p break_word">
|
2015-05-27 11:25:32 +08:00
|
|
|
<%= @work.description%>
|
2015-05-22 14:45:01 +08:00
|
|
|
</p>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</li>
|
|
|
|
<li >
|
|
|
|
<span class="tit_fb"> 附件:</span>
|
2015-05-27 11:25:32 +08:00
|
|
|
<% if @work.attachments.empty?%>
|
2015-05-22 14:45:01 +08:00
|
|
|
<span style="color: #999999">尚未提交附件</span>
|
|
|
|
<% else%>
|
2015-05-27 17:51:26 +08:00
|
|
|
<div class="fl">
|
|
|
|
<%= render :partial => 'work_attachments', :locals => {:attachments => @work.attachments} %>
|
|
|
|
</div>
|
2015-05-22 14:45:01 +08:00
|
|
|
<% end%>
|
|
|
|
</li>
|
|
|
|
<div class="cl"></div>
|
2015-05-26 17:51:56 +08:00
|
|
|
|
2015-05-28 15:54:42 +08:00
|
|
|
<% if @is_teacher || (@homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
|
|
|
|
<!-- 老师 || 匿评作业 && 开启匿评状态 && 不是当前用户自己的作品 -->
|
|
|
|
<div id="add_student_score_<%= @work.id%>" class="mt10 ">
|
|
|
|
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
|
|
|
|
</div>
|
|
|
|
<% end%>
|
2015-05-21 17:17:54 +08:00
|
|
|
</ul>
|
2015-05-22 14:45:01 +08:00
|
|
|
|
2015-05-28 15:54:42 +08:00
|
|
|
<div class="ping_box" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
2015-05-27 16:21:59 +08:00
|
|
|
<%@work.student_works_scores.order("created_at desc").each do |score|%>
|
2015-05-27 16:01:00 +08:00
|
|
|
<div id="work_score_<%= score.id%>">
|
|
|
|
<%= render :partial => 'student_work_score',:locals => {:score => score}%>
|
|
|
|
</div>
|
2015-05-27 11:25:32 +08:00
|
|
|
<% end%>
|
2015-05-21 17:17:54 +08:00
|
|
|
</div><!---ping_box end--->
|
2015-05-27 11:25:32 +08:00
|
|
|
<a href="javascript:void(0);" class="fr c_blue mt5 mb5" onclick="$('#about_hwork_<%= @work.id%>').html('');">收起</a>
|
2015-05-21 17:17:54 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
</div><!---show_hwork end--->
|