From b62b16b5a2d9eb9dcd0d797d5d34cadf4a825d86 Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 24 Nov 2017 15:58:45 -0600 Subject: [PATCH] Fix #3398: Show "(deleted)" next to topics in forum searches. --- app/assets/stylesheets/specific/forum.scss | 10 +++++++++- app/views/forum_posts/index.html.erb | 9 +++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/specific/forum.scss b/app/assets/stylesheets/specific/forum.scss index 5c0cddf61..9702d27da 100644 --- a/app/assets/stylesheets/specific/forum.scss +++ b/app/assets/stylesheets/specific/forum.scss @@ -64,7 +64,7 @@ div#c-forum-topics { } span.locked-topic { - color: #666; + color: gray; } span.level-topic { @@ -76,3 +76,11 @@ div#c-forum-topics { white-space: nowrap; } } + +#c-forum-posts #a-index { + tr[data-topic-is-deleted="true"] .forum-post-topic-title::after, + tr[data-is-deleted="true"] .forum-post-excerpt::after { + content: " (deleted)"; + color: gray; + } +} diff --git a/app/views/forum_posts/index.html.erb b/app/views/forum_posts/index.html.erb index e7e5d0237..9613706a6 100644 --- a/app/views/forum_posts/index.html.erb +++ b/app/views/forum_posts/index.html.erb @@ -12,13 +12,10 @@ <% @forum_posts.each do |forum_post| %> <% if CurrentUser.is_moderator? || !forum_post.is_deleted? %> - - <%= link_to forum_post.topic.title, forum_topic_path(forum_post.topic) %> - + + <%= 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 %>