mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 09:21:25 +00:00
Add sticky class to topic links.
This commit is contained in:
parent
85a2092a7c
commit
2f8f41d6f3
1 changed files with 4 additions and 2 deletions
|
@ -33,11 +33,13 @@
|
|||
<b>Locked: </b>
|
||||
<% 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" : "") %>
|
||||
</h5>
|
||||
|
||||
<% 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) %>
|
||||
|
|
Loading…
Reference in a new issue