From 7b2c1d70d04662a873ed9c4f81d86c5e5ad1bd5e Mon Sep 17 00:00:00 2001 From: BOHUNG Date: Fri, 20 Mar 2020 16:48:31 +0800 Subject: [PATCH] Add display last modified user in admin index page. --- app/views/admin/faqs/_index.html.erb | 2 ++ config/locales/en.yml | 1 + config/locales/zh_tw.yml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/admin/faqs/_index.html.erb b/app/views/admin/faqs/_index.html.erb index 25bfcbd..be658b8 100644 --- a/app/views/admin/faqs/_index.html.erb +++ b/app/views/admin/faqs/_index.html.erb @@ -4,6 +4,7 @@ <% @table_fields.each do |f| %> <%= thead(f) %> <% end %> + <%=t('faq.update_user')%> @@ -36,6 +37,7 @@ <%= tag.name %> <% end %> + <%=User.find(qa.update_user_id).user_name rescue ''%> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index afcb684..3baaa04 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -18,6 +18,7 @@ en: read_more: Read More question: Question answer: Answer + update_user: Last modified qa: create_qa_category_success: FAQ category was successfully created editing_web_resource: Editing FAQ diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 087a5ca..2fb8a51 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -16,7 +16,7 @@ zh_tw: read_more: 閱讀更多 question: 問題 answer: 回答 - + update_user: 最後修改者 qa: create_qa_category_success: 問與答類別已成功建立 editing_web_resource: 編輯問與答