Added labes for sticky and locked topics

This commit is contained in:
2013-01-27 01:48:32 -05:00
parent c2ed7fd46f
commit add9b67c8a
3 changed files with 17 additions and 3 deletions

View File

@@ -30,8 +30,15 @@
<% @topics.each do |topic| %>
<tr>
<td class="icon"><%= image_tag 'ruby.png' %></td>
<td class="description">
<%= link_to topic.title, topic_path(topic) %><br />
<td class="description">
<% if topic.sticky %>
<span class="label label-info">Sticky</span>
<% end %>
<% if topic.locked %>
<span class="label label-important">Locked</span>
<% end %>
<%= link_to topic.title, topic_path(topic) %>
<br />
<span class="smaller">by <%= topic.user.username %></span>
</td>
<td class="counts smaller"><%= topic.posts.size - 1 %></td>