Added labes for sticky and locked topics
This commit is contained in:
@@ -22,7 +22,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="icon"><%= image_tag 'ruby.png' %></td>
|
<td class="icon"><%= image_tag 'ruby.png' %></td>
|
||||||
<td class="description">
|
<td class="description">
|
||||||
<%= link_to forum.title, forum_path(forum) %><br />
|
<%= link_to forum.title, forum_path(forum) %>
|
||||||
|
<br />
|
||||||
<span class="smaller"><%= forum.description %></span><br />
|
<span class="smaller"><%= forum.description %></span><br />
|
||||||
</td>
|
</td>
|
||||||
<td class="counts smaller"><%= forum.topics.size %></td>
|
<td class="counts smaller"><%= forum.topics.size %></td>
|
||||||
|
|||||||
@@ -30,8 +30,15 @@
|
|||||||
<% @topics.each do |topic| %>
|
<% @topics.each do |topic| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="icon"><%= image_tag 'ruby.png' %></td>
|
<td class="icon"><%= image_tag 'ruby.png' %></td>
|
||||||
<td class="description">
|
<td class="description">
|
||||||
<%= link_to topic.title, topic_path(topic) %><br />
|
<% 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>
|
<span class="smaller">by <%= topic.user.username %></span>
|
||||||
</td>
|
</td>
|
||||||
<td class="counts smaller"><%= topic.posts.size - 1 %></td>
|
<td class="counts smaller"><%= topic.posts.size - 1 %></td>
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
<div class="right controls"><%= link_to "Back to Forum", forum_path(@topic.forum) %></div>
|
<div class="right controls"><%= link_to "Back to Forum", forum_path(@topic.forum) %></div>
|
||||||
<div class="module">
|
<div class="module">
|
||||||
<div class="module_header">
|
<div class="module_header">
|
||||||
|
<% if @topic.sticky %>
|
||||||
|
<span class="label label-info">Sticky</span>
|
||||||
|
<% end %>
|
||||||
|
<% if @topic.locked %>
|
||||||
|
<span class="label label-important">Locked</span>
|
||||||
|
<% end %>
|
||||||
<%= @topic.title %>
|
<%= @topic.title %>
|
||||||
<span class="right controls">
|
<span class="right controls">
|
||||||
<%= link_to "Edit", edit_topic_path(@topic) if can? :manage, @topic %>
|
<%= link_to "Edit", edit_topic_path(@topic) if can? :manage, @topic %>
|
||||||
|
|||||||
Reference in New Issue
Block a user