From ed4096949f3c4f4c943cf50b1cbf7000f70fc2e5 Mon Sep 17 00:00:00 2001 From: jomo Date: Mon, 22 Sep 2014 06:21:29 +0200 Subject: [PATCH] fix truncation of thread titles --- app/views/forums/show.html.erb | 2 +- app/views/forumthreads/show.html.erb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index bd985cd..c4b52f4 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -19,7 +19,7 @@
"> - <%= link_to thread.title, forumthread_path(thread) %> + <%= link_to truncate(thread.title, length: 60, omission: " …"), forumthread_path(thread) %>
<% if rpl = thread.replies.last %> <%= rpl.author.name %> <%= link_to "replied", forumthread_path(thread) + "#reply-#{rpl.id}" %> . diff --git a/app/views/forumthreads/show.html.erb b/app/views/forumthreads/show.html.erb index 97c5f81..3473693 100644 --- a/app/views/forumthreads/show.html.erb +++ b/app/views/forumthreads/show.html.erb @@ -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 @thread %> -

<%= truncate(@thread.title, length: 60, omission: " …") %>

+<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to truncate(@thread.title, length: 60, omission: " …") %> +

<%= title @thread.title %>