% revise_attachment = work.attachments.where("attachtype = 7").first %>
<% if @homework.end_time < Date.today %>
<% if revise_attachment && @is_teacher %>
追加修订附件
追加附件:
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 2} %>
追加时间:<%=format_time revise_attachment.created_on.to_s %> (<%=revise_attachment_status @homework,revise_attachment %>)
<% unless revise_attachment.description == "" %>
附件描述:<%=revise_attachment.description %>
<% end %>
<% end %>
<% if work.user == User.current %>
追加修订附件
<% if revise_attachment %>
追加附件:
<%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 1} %>
追加时间:<%=format_time revise_attachment.created_on.to_s %>
<% unless revise_attachment.description == "" %>
附件描述:<%=revise_attachment.description %>
<% end %>
<% end %>
<% end %>
<% end %>