From dd78bc25ffcee562518cc5e059ab024f3c77d5ed Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 26 Nov 2014 15:33:36 +0800 Subject: [PATCH] =?UTF-8?q?#1619=20=E4=BD=9C=E4=B8=9A=E6=9C=AA=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E9=99=84=E4=BB=B6=E6=97=B6=E5=A2=9E=E5=8A=A0=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_attach/_show.html.erb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/homework_attach/_show.html.erb b/app/views/homework_attach/_show.html.erb index 0b36d431b..bf797e441 100644 --- a/app/views/homework_attach/_show.html.erb +++ b/app/views/homework_attach/_show.html.erb @@ -98,11 +98,17 @@ <% end %>
-<%= l(:label_attachment) %>:
+
+
+ <%= l(:label_attachment) %>:
- <% options = {:author => true } %>
- <%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %>
+ <% if @homework.attachments.empty?%>
+ 尚未提交附件
+ <% else%>
+ <% options = {:author => true } %>
+ <%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %>
+ <% end%>