后台作业列表:作业班级为空时,作业列表样式错误

This commit is contained in:
daiao 2016-09-29 16:55:32 +08:00
parent b807fc7766
commit e2be4a9e7f
1 changed files with 6 additions and 4 deletions

View File

@ -38,11 +38,13 @@
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.name%>'> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.name%>'>
<%=link_to(homework.try(:name), student_work_index_path(:homework => homework.id))%> <%=link_to(homework.try(:name), student_work_index_path(:homework => homework.id))%>
</td> </td>
<% if homework.course %>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.course.name%>'> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%= homework.course.nil? ? "" : homework.course.name %>'>
<%= link_to(homework.course.name, course_path(homework.course.id)) %> <% if homework.course %>
<%= link_to homework.course.name, course_path(homework.course.id) %>
<% end %>
</td> </td>
<% end %>
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if homework.try(:user).try(:realname) == ' '%><%= homework.try(:user)%><% else %><%=homework.try(:user).try(:realname) %><% end %>'> <td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if homework.try(:user).try(:realname) == ' '%><%= homework.try(:user)%><% else %><%=homework.try(:user).try(:realname) %><% end %>'>
<% if homework.try(:user).try(:realname) == ' '%> <% if homework.try(:user).try(:realname) == ' '%>
<%= link_to(homework.try(:user), user_path(homework.user_id)) %> <%= link_to(homework.try(:user), user_path(homework.user_id)) %>