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

37 lines
2.1 KiB
Plaintext
Raw Normal View History

2015-12-04 16:21:11 +08:00
<% revise_attachment = work.attachments.where("attachtype = 7").first %>
<% if @homework.end_time < Date.today %>
<% if revise_attachment && @is_teacher %>
<div class="resubAtt mb15">
<span class="resubTitle">追加修订附件</span>
</div>
<div class="mb10" id="revise_attachment_div_<%=revise_attachment.id %>">
2015-12-04 16:21:11 +08:00
<span class="tit_fb"> 追加附件:</span>
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 2} %>
2015-12-25 17:07:27 +08:00
<span class="tit_fb">追加时间:</span><%=format_time revise_attachment.created_on.to_s %>&nbsp;&nbsp;(<%=revise_attachment_status @homework,revise_attachment %>)<br />
<% unless revise_attachment.description == "" %>
2016-10-28 10:37:52 +08:00
<span class="tit_fb break_word">追加理由:</span><p class="showHworkP"><%=revise_attachment.description %></p>
2015-12-25 17:07:27 +08:00
<% end %>
2015-12-04 16:21:11 +08:00
</div>
2015-12-25 17:07:27 +08:00
<div class="cl"></div>
2015-12-04 16:21:11 +08:00
<% end %>
<% if work.user == User.current && !User.current.allowed_to?(:as_teacher, @homework.course) %>
2015-12-04 16:21:11 +08:00
<div class="resubAtt mb15">
<span class="resubTitle">追加修订附件</span>
</div>
<% if revise_attachment %>
<div class="mb10" id="revise_attachment_div_<%=revise_attachment.id %>">
2015-12-04 16:21:11 +08:00
<span class="tit_fb"> 追加附件:</span>
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 1} %>
2015-12-25 17:07:27 +08:00
<span class="tit_fb">追加时间:</span><%=format_time revise_attachment.created_on.to_s %><br />
<% unless revise_attachment.description == "" %>
2016-10-28 10:37:52 +08:00
<span class="tit_fb break_word">追加理由:</span><p class="showHworkP"><%=revise_attachment.description %></p>
2015-12-25 17:07:27 +08:00
<% end %>
2015-12-04 16:21:11 +08:00
</div>
<% end %>
2015-12-25 17:07:27 +08:00
<div class="cl"></div>
<div class="mb10 mt5">
2016-04-22 11:27:30 +08:00
<a href="javascript:void(0);" id="upload_revise_attachment" onclick="show_upload();" class="blueCir ml5" title="请选择文件上传">上传附件</a>
2015-12-04 16:21:11 +08:00
</div>
<% end %>
2016-04-22 11:27:30 +08:00
<% end %>