fix truncation of thread titles

This commit is contained in:
jomo
2014-09-22 06:21:29 +02:00
parent c0507bdfdf
commit ed4096949f
2 changed files with 3 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
</div> </div>
<div class="items bold"> <div class="items bold">
<div class="item <%= "#{"locked" if thread.locked}#{"sticky" if thread.sticky}" %>"> <div class="item <%= "#{"locked" if thread.locked}#{"sticky" if thread.sticky}" %>">
<%= link_to thread.title, forumthread_path(thread) %> <%= link_to truncate(thread.title, length: 60, omission: " …"), forumthread_path(thread) %>
<div class="item-info"> <div class="item-info">
<% if rpl = thread.replies.last %> <% if rpl = thread.replies.last %>
<%= rpl.author.name %> <%= link_to "replied", forumthread_path(thread) + "#reply-#{rpl.id}" %> <time title="<%= rpl.created_at.strftime("%e %b %Y, %H:%M") %>" datetime="<%= rpl.created_at.to_datetime.rfc3339 %>"><%= rpl.created_at.strftime("%e %b %Y, %H:%M") %></time>. <%= rpl.author.name %> <%= link_to "replied", forumthread_path(thread) + "#reply-#{rpl.id}" %> <time title="<%= rpl.created_at.strftime("%e %b %Y, %H:%M") %>" datetime="<%= rpl.created_at.to_datetime.rfc3339 %>"><%= rpl.created_at.strftime("%e %b %Y, %H:%M") %></time>.

View File

@@ -1,7 +1,5 @@
<% title @thread.title %> <%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to truncate(@thread.title, length: 60, omission: " …") %>
<h1><%= title @thread.title %></h1>
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to @thread %>
<h1><%= truncate(@thread.title, length: 60, omission: " …") %></h1>
<div class="item-group thread with-avatar" id="thread-<%= @thread.id %>"> <div class="item-group thread with-avatar" id="thread-<%= @thread.id %>">
<div class="header"> <div class="header">