about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMashiro <moezhx@outlook.com>2020-12-15 13:28:14 +0800
committerGitHub <noreply@github.com>2020-12-15 06:28:14 +0100
commit75d2762fdf600de6785f612caf182b32064a9bf6 (patch)
treead9bfa48d1505367d3cc505e3dee2efca02df9e4
parent1390cc194bd07b85fe36e31a0cab22981315974d (diff)
Add "invite request content" display in user account admin page (#15265)
* feat: display `invite_request_text` in admin's user account page

* fix: move invite_request to the bottom of accounts page

* fix: remove time display, remove formate, change code terminology

* fix: remove escape
-rw-r--r--app/views/admin/accounts/show.html.haml10
-rw-r--r--config/locales/en.yml1
2 files changed, 11 insertions, 0 deletions
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index d5978eddd..ae527cc23 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -242,3 +242,13 @@
 
     .actions
       = f.button :button, t('admin.account_moderation_notes.create'), type: :submit
+
+  %hr.spacer/
+
+  - if @account.user&.invite_request&.text&.present?
+    %div.speech-bubble
+      %div.speech-bubble__bubble
+        = @account.user&.invite_request&.text
+      %div.speech-bubble__owner
+        = admin_account_link_to @account
+        = t('admin.accounts.invite_request_text')
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 3ff01ac86..1f5798fcc 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -131,6 +131,7 @@ en:
       follows: Follows
       header: Header
       inbox_url: Inbox URL
+      invite_request_text: Reasons for joining
       invited_by: Invited by
       ip: IP
       joined: Joined