From 28057c1555b88984e9c15c9dd8aa56c39947e302 Mon Sep 17 00:00:00 2001 From: Toks Date: Thu, 6 Aug 2015 19:45:23 -0400 Subject: [PATCH] Show "updated by" message for topic deletion, lock, sticky fixes #1903 --- app/views/forum_posts/_forum_post.html.erb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/forum_posts/_forum_post.html.erb b/app/views/forum_posts/_forum_post.html.erb index a190d0799..2f0892f66 100644 --- a/app/views/forum_posts/_forum_post.html.erb +++ b/app/views/forum_posts/_forum_post.html.erb @@ -15,8 +15,14 @@
<%= format_text(forum_post.body) %>
- <% if forum_post.updated_at - forum_post.created_at > 5.minutes %> -

Updated by <%= link_to_user forum_post.updater %> <%= time_ago_in_words_tagged(forum_post.updated_at) %>

+ <% if forum_post.is_original_post? %> + <% if @forum_topic.updated_at - @forum_topic.created_at > 5.minutes %> +

Updated by <%= link_to_user @forum_topic.updater %> <%= time_ago_in_words_tagged(@forum_topic.updated_at) %>

+ <% end %> + <% else %> + <% if forum_post.updated_at - forum_post.created_at > 5.minutes %> +

Updated by <%= link_to_user forum_post.updater %> <%= time_ago_in_words_tagged(forum_post.updated_at) %>

+ <% end %> <% end %>
  • ID: <%= forum_post.id %>