作业列表:没有作业时下拉框被点击后,显示一条记录:目前尚未发布作业

This commit is contained in:
cxt 2016-06-24 11:20:48 +08:00
parent a41d18dd0e
commit 2959391438
1 changed files with 9 additions and 5 deletions

View File

@ -45,11 +45,15 @@
<li>
<a href="javascript:void(0);" class="menu_arrow" style="font-size:16px; color:#4b4b4b; font-weight: normal; padding-left: 0px;">作业</a>
<ul style="max-height:240px; overflow-y:auto; overflow-x:hidden;">
<% @homework_commons.each_with_index do |homework_common,index |%>
<li class="pr10">
<%= link_to "作业#{@homework_commons.count - index}#{homework_common.name}",student_work_index_path(:homework => homework_common.id),:target=>"_blank"%>
</li>
<% end%>
<% if @homework_commons.empty? %>
<li class="pr10" style="font-weight: normal; color: #888888; width: 120px; padding-left: 15px; padding-bottom: 5px;">目前尚未发布作业</li>
<% else %>
<% @homework_commons.each_with_index do |homework_common,index |%>
<li class="pr10">
<%= link_to "作业#{@homework_commons.count - index}#{homework_common.name}",student_work_index_path(:homework => homework_common.id),:target=>"_blank"%>
</li>
<% end%>
<% end %>
</ul>
</li>
</ul>