From 3d52f690b3e4241d0a46f1fb1941c5da3ca27c8d Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Mon, 28 Jan 2019 22:51:06 +0530 Subject: [PATCH] UX: Add post action text in non-JS topic view --- app/views/topics/show.html.erb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 138646bd43..456135d668 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -47,10 +47,16 @@
- <%= "(#{u.name})" if (SiteSetting.display_name_on_posts && SiteSetting.enable_names? && !u.name.blank?) %> - + <%= "(#{u.name})" if (SiteSetting.display_name_on_posts && SiteSetting.enable_names? && !u.name.blank?) %> + <% + who_username = post.custom_fields["action_code_who"] || "" + if post.action_code + %> + <%= t("js.action_codes.#{post.action_code}", when: "", who: who_username).html_safe %> + <% end %> + #<%= post.post_number %>