You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/app/views/student_work/_show.html.erb

99 lines
4.7 KiB

<div class="show_hwork_arrow"></div>
<div class="showHwork">
<ul>
<li class="fl" >
<span class="tit_fb">上交时间:</span>
<%=format_time work.created_at %>
</li>
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
<li class="fr" >
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del",:title=>"删除") %>
</li>
<li class="fr mr5" >
<%= link_to "",edit_student_work_path(work),:class => "pic_edit",:title => "修改"%>
</li>
<% end%>
<% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
<!-- 匿评结束阶段,显示点赞按钮 -->
<li class="fr" id="student_work_praise_<%= work.id%>">
<%= render :partial => 'student_work_praise' %>
</li>
<% end%>
<div class="cl"></div>
<!--<li ><span class="tit_fb"> 参与人员:</span>程梦雯&nbsp;&nbsp;王强</li>-->
<% if work.project%>
<li >
<span class="tit_fb"> 关联项目:</span>
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
</li>
<% end%>
<li >
<span class="tit_fb ">内容:</span>
<div class="showHworkP break_word">
<%= text_format(work.description) if work.description%>
</div>
<div class="cl"></div>
</li>
<li >
<span class="tit_fb"> 附件:</span>
<% if work.attachments.empty?%>
<span style="color: #999999">尚未提交附件</span>
<% else%>
<div class="fl" style="width: 90%;">
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments, :status => @homework.homework_detail_manual.comment_status} %>
</div>
<% end%>
<div class="cl"></div>
</li>
<li >
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
<div id="add_student_score_<%= work.id%>" class="mt10 evaluation">
<%= render :partial => 'add_score',:locals => {:work => work,:score => score}%>
</div>
<% end%>
<div class="cl"></div>
</li>
</ul>
<!--<div class="resubAtt">
<span class="resubTitle">追加修订附件</span>
</div>
<div class="mt15">
<span class="tit_fb"> 追加附件:</span>
<a href="javascript:void(0);" class="link_file fl" >socket实验-123456-王强revise.zip</a>
<span id="attachments_fields<%= work.id%>" xmlns="http://www.w3.org/1999/html">
<span id="attachments_p<%= work.id %>">-->
<%#= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename link_file', :readonly=>'readonly')%>
<%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<!--<span class="ispublic-label"><%#= l(:field_is_public)%>:</span>-->
<%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%#= link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
<%#= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
<!--</span>
</span>
<span class="ml5">(123KB)</span><br />
<span class="tit_fb">追加时间:</span>2015-12-03 11:00&nbsp;&nbsp;(此时其他同学作品尚未公开)
</div>
<div class="mt5">
<%#= render :partial => 'student_work/revise_attachments', :locals => {:work => work } %>
<a href="javascript:void(0);" class="blueCir ml5" title="请选择文件上传">上传附件</a>
</div>
<div class="cl"></div>-->
<div class="ping_box fl" id="score_list_<%= work.id%>" style="<%= work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
<%student_work_scores.each do |student_score|%>
<div id="work_score_<%= student_score.id%>">
<%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
</div>
<% end%>
</div>
<!---ping_box end--->
<a href="javascript:void(0);" class="fr linkBlue mt5 mb5" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
<div class="cl"></div>
</div>