课程主页,如课程资料数为0,则取消显示
This commit is contained in:
parent
2b5160f2d9
commit
fe93a9c2c5
|
@ -25,8 +25,10 @@
|
|||
<%= link_to course.school.name.try(:gsub, /(.+)$/, '\1'), options={:action => 'course', :school_id => course.school.id}, html_options={:method => 'get'} %>
|
||||
<% end %>
|
||||
(<%= course.members.count %>人)
|
||||
<%# files_count = course.attachments.count.to_s %>
|
||||
(<%= link_to "#{course.attachments.count.to_s}份", course_files_path(course) %>资料)
|
||||
<% files_count = course.attachments.count %>
|
||||
<% if files_count > 0%>
|
||||
(<%= link_to "#{files_count.to_s}份", course_files_path(course) %>资料)
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue