From c4a264f8a6864f5487d7d63945b3fa11dd7ddd98 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 22 Jan 2016 18:48:50 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E5=93=81=E6=97=B6?=
=?UTF-8?q?=E7=9A=84=E9=99=84=E4=BB=B6=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/student_work/_work_edit_information.html.erb | 10 +++++++++-
app/views/student_work/_work_information.html.erb | 10 +++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/app/views/student_work/_work_edit_information.html.erb b/app/views/student_work/_work_edit_information.html.erb
index 38670d9e4..1934d15eb 100644
--- a/app/views/student_work/_work_edit_information.html.erb
+++ b/app/views/student_work/_work_edit_information.html.erb
@@ -13,7 +13,15 @@
<%= "无附件"%>
<% else %>
- <%= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
+ <% @student_work.attachments.each_with_index do |attachment,i| %>
+
+ <%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
+
(<%= number_to_human_size attachment.filesize %>)
+
+
+ <% end -%>
+ <%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
<% end %>
diff --git a/app/views/student_work/_work_information.html.erb b/app/views/student_work/_work_information.html.erb
index bc728ca71..d23f21c4d 100644
--- a/app/views/student_work/_work_information.html.erb
+++ b/app/views/student_work/_work_information.html.erb
@@ -13,7 +13,15 @@
<%= "无附件"%>
<% else %>
- <%= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
+ <% @student_work.attachments.each_with_index do |attachment,i| %>
+
+ <%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
+
(<%= number_to_human_size attachment.filesize %>)
+
+
+ <% end -%>
+ <%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
<% end %>