hide deleted forum posts in search
This commit is contained in:
@@ -11,17 +11,19 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @forum_posts.each do |forum_post| %>
|
<% @forum_posts.each do |forum_post| %>
|
||||||
<tr>
|
<% if CurrentUser.is_janitor? || !forum_post.is_deleted? %>
|
||||||
<td><%= link_to forum_post.topic.title, forum_topic_path(forum_post.topic) %></td>
|
<tr>
|
||||||
<td>
|
<td><%= link_to forum_post.topic.title, forum_topic_path(forum_post.topic) %></td>
|
||||||
<%= link_to truncate(forum_post.body, :length => 50), forum_post_path(forum_post) %>
|
<td>
|
||||||
<% if forum_post.is_deleted? %>
|
<%= link_to truncate(forum_post.body, :length => 50), forum_post_path(forum_post) %>
|
||||||
(deleted)
|
<% if forum_post.is_deleted? %>
|
||||||
<% end %>
|
(deleted)
|
||||||
</td>
|
<% end %>
|
||||||
<td><%= link_to_user forum_post.creator %></td>
|
</td>
|
||||||
<td><%= time_ago_in_words_tagged forum_post.created_at %></td>
|
<td><%= link_to_user forum_post.creator %></td>
|
||||||
</tr>
|
<td><%= time_ago_in_words_tagged forum_post.created_at %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user