修复bug#2211:course主页--还有空间显示课程老师的姓名就不要以省略号结束

This commit is contained in:
yutao 2015-05-19 10:35:17 +08:00
parent 6c6ae38f7a
commit 5cb9cc0903
1 changed files with 3 additions and 3 deletions

View File

@ -5,13 +5,13 @@
</div> </div>
<!-- 上左下右 --> <!-- 上左下右 -->
<div class='desc_item'> <div class='desc_item'>
<span class=''> <div class='' style="float:left;max-width:300px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">
<% unless course.is_public == 1 %> <% unless course.is_public == 1 %>
<span class="private_project"><%= l(:label_private) %></span> <span class="private_project"><%= l(:label_private) %></span>
<% end %> <% end %>
<%= link_to(course.name.truncate(25, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %> <%= link_to(course.name+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
</span> </div>
<span class='font_bolder'> <span class='font_bolder'>
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %> <%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
<%#=course.try(:teacher).try(:name)%> <%#=course.try(:teacher).try(:name)%>