From 741a11a28903be0ad5f59745be434bb3ee4bb68e Mon Sep 17 00:00:00 2001 From: simplefl Date: Thu, 9 Apr 2015 19:23:29 +0200 Subject: [PATCH] Add sticky class to topic links. --- app/views/forums/show.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 81ae62d..6b70944 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -33,11 +33,13 @@ Locked: <% end %> - <%= link_to (h topic), topic, class: ((cuser and !topic.read_by? cuser) ? "unread" : "read") %> + <%= link_to (h topic), topic, + class: ((cuser and !topic.read_by? cuser) ? "unread" : "read") + + ((topic.state == Topic::STATE_STICKY) ? " sticky" : "") %> <% if topic.posts.count > Topic::POSTS_PAGE %> - Page: + Page: <% (1..((topic.posts.count/Topic::POSTS_PAGE).ceil + 1)).to_a.each do |page| %> <%= ", " unless page == 1 %> <%= link_to page, topic_url(topic, page: page) %>