diff --git a/app/controllers/forum_posts_controller.rb b/app/controllers/forum_posts_controller.rb index e67920828..57b44eb98 100644 --- a/app/controllers/forum_posts_controller.rb +++ b/app/controllers/forum_posts_controller.rb @@ -16,7 +16,11 @@ class ForumPostsController < ApplicationController end def index - @search = ForumPost.active.search(params[:search]) + if CurrentUser.is_janitor? + @search = ForumPost.search(params[:search]) + else + @search = ForumPost.active.search(params[:search]) + end @forum_posts = @search.order("forum_posts.id DESC").paginate(params[:page], :search_count => params[:search]) respond_with(@forum_posts) do |format| format.xml do diff --git a/app/views/forum_posts/index.html.erb b/app/views/forum_posts/index.html.erb index e9484f24d..b1503575a 100644 --- a/app/views/forum_posts/index.html.erb +++ b/app/views/forum_posts/index.html.erb @@ -13,7 +13,12 @@ <% @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) %> + + <%= 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 %>