diff --git a/app/views/forum_posts/index.html.erb b/app/views/forum_posts/index.html.erb index b1503575a..32644f531 100644 --- a/app/views/forum_posts/index.html.erb +++ b/app/views/forum_posts/index.html.erb @@ -11,17 +11,19 @@ <% @forum_posts.each do |forum_post| %> - - <%= link_to forum_post.topic.title, forum_topic_path(forum_post.topic) %> - - <%= link_to truncate(forum_post.body, :length => 50), forum_post_path(forum_post) %> - <% if forum_post.is_deleted? %> - (deleted) - <% end %> - - <%= link_to_user forum_post.creator %> - <%= time_ago_in_words_tagged forum_post.created_at %> - + <% if CurrentUser.is_janitor? || !forum_post.is_deleted? %> + + <%= link_to forum_post.topic.title, forum_topic_path(forum_post.topic) %> + + <%= link_to truncate(forum_post.body, :length => 50), forum_post_path(forum_post) %> + <% if forum_post.is_deleted? %> + (deleted) + <% end %> + + <%= link_to_user forum_post.creator %> + <%= time_ago_in_words_tagged forum_post.created_at %> + + <% end %> <% end %>