如果课程没有附件,取消显示附件列表

This commit is contained in:
sw 2014-11-22 12:43:42 +08:00
parent 9908a7f41f
commit 287e9151a2
1 changed files with 20 additions and 21 deletions

View File

@ -161,6 +161,7 @@
<div class="user_underline"></div>
<!-- info -->
<% unless @bid.attachments.empty? %>
<div class="inf_user_image">
<table>
<tr>
@ -172,10 +173,8 @@
</tr>
<tr>
<td valign="top" colspan="2">
<% if @bid.attachments.any?%>
<% options = {:author => true,:deletable => (@bid.author.id == User.current.id || User.current.admin? ? true : false),:wrap => true,:length => 7} %>
<%= render :partial => 'attachments/links', :locals => {:attachments => @bid.attachments, :options => options} %>
<% end %>
</td>
</tr>
<tr>
@ -183,9 +182,9 @@
<%#= @bid.homework_type==Bid::HomeworkFile ? "提交文件" : "提交项目" %>
</td-->
</tr>
</table>
</div>
<% end%>
</div>
</div>
<!-- end -->