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

course_group
sw 11 years ago
parent 9908a7f41f
commit 287e9151a2

@ -161,6 +161,7 @@
<div class="user_underline"></div> <div class="user_underline"></div>
<!-- info --> <!-- info -->
<% unless @bid.attachments.empty? %>
<div class="inf_user_image"> <div class="inf_user_image">
<table> <table>
<tr> <tr>
@ -172,10 +173,8 @@
</tr> </tr>
<tr> <tr>
<td valign="top" colspan="2"> <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} %> <% 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} %> <%= render :partial => 'attachments/links', :locals => {:attachments => @bid.attachments, :options => options} %>
<% end %>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -183,9 +182,9 @@
<%#= @bid.homework_type==Bid::HomeworkFile ? "提交文件" : "提交项目" %> <%#= @bid.homework_type==Bid::HomeworkFile ? "提交文件" : "提交项目" %>
</td--> </td-->
</tr> </tr>
</table> </table>
</div> </div>
<% end%>
</div> </div>
</div> </div>
<!-- end --> <!-- end -->

Loading…
Cancel
Save