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

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,31 +161,30 @@
<div class="user_underline"></div>
<!-- info -->
<div class="inf_user_image">
<table>
<tr>
<td valign="top" colspan="2" style="font-size: 16px;padding-left: 8px;">
<strong>
<%= l(:label_attachment) %> :
</strong>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<% if @bid.attachments.any?%>
<% unless @bid.attachments.empty? %>
<div class="inf_user_image">
<table>
<tr>
<td valign="top" colspan="2" style="font-size: 16px;padding-left: 8px;">
<strong>
<%= l(:label_attachment) %> :
</strong>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<% 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>
<!--td>作业类型:
</td>
</tr>
<tr>
<!--td>作业类型:
<%#= @bid.homework_type==Bid::HomeworkFile ? "提交文件" : "提交项目" %>
</td-->
</tr>
</table>
</div>
</tr>
</table>
</div>
<% end%>
</div>
</div>
<!-- end -->