Add: 管理画面での操作履歴フィルタにkmyblue独自項目 (#635)

This commit is contained in:
KMY(雪あすか) 2024-03-05 12:38:54 +09:00 committed by GitHub
parent cfb808b915
commit 8cb4838fb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 1 deletions

View file

@ -23,7 +23,9 @@ module Admin::ActionLogsHelper
link_to log.human_identifier, disputes_strike_path(log.target_id) link_to log.human_identifier, disputes_strike_path(log.target_id)
when 'Announcement' when 'Announcement'
link_to truncate(log.human_identifier), edit_admin_announcement_path(log.target_id) link_to truncate(log.human_identifier), edit_admin_announcement_path(log.target_id)
when 'IpBlock', 'Instance', 'CustomEmoji' when 'CustomEmoji'
link_to log.human_identifier, edit_admin_custom_emoji_path(log.target_id)
when 'IpBlock', 'Instance'
log.human_identifier log.human_identifier
when 'CanonicalEmailBlock' when 'CanonicalEmailBlock'
content_tag(:samp, (log.human_identifier.presence || '')[0...7], title: log.human_identifier) content_tag(:samp, (log.human_identifier.presence || '')[0...7], title: log.human_identifier)

View file

@ -16,6 +16,8 @@ class Admin::ActionLogFilter
confirm_user: { target_type: 'User', action: 'confirm' }.freeze, confirm_user: { target_type: 'User', action: 'confirm' }.freeze,
approve_user: { target_type: 'User', action: 'approve' }.freeze, approve_user: { target_type: 'User', action: 'approve' }.freeze,
reject_user: { target_type: 'User', action: 'reject' }.freeze, reject_user: { target_type: 'User', action: 'reject' }.freeze,
approve_remote_account: { target_type: 'Account', action: 'approve_remote' }.freeze,
reject_remote_account: { target_type: 'Account', action: 'reject_remote' }.freeze,
create_account_warning: { target_type: 'AccountWarning', action: 'create' }.freeze, create_account_warning: { target_type: 'AccountWarning', action: 'create' }.freeze,
create_announcement: { target_type: 'Announcement', action: 'create' }.freeze, create_announcement: { target_type: 'Announcement', action: 'create' }.freeze,
create_custom_emoji: { target_type: 'CustomEmoji', action: 'create' }.freeze, create_custom_emoji: { target_type: 'CustomEmoji', action: 'create' }.freeze,
@ -60,6 +62,8 @@ class Admin::ActionLogFilter
update_announcement: { target_type: 'Announcement', action: 'update' }.freeze, update_announcement: { target_type: 'Announcement', action: 'update' }.freeze,
update_custom_emoji: { target_type: 'CustomEmoji', action: 'update' }.freeze, update_custom_emoji: { target_type: 'CustomEmoji', action: 'update' }.freeze,
update_status: { target_type: 'Status', action: 'update' }.freeze, update_status: { target_type: 'Status', action: 'update' }.freeze,
force_cw_status: { target_type: 'Status', action: 'force_cw' }.freeze,
force_sensitive_status: { target_type: 'Status', action: 'force_sensitive' }.freeze,
update_user_role: { target_type: 'UserRole', action: 'update' }.freeze, update_user_role: { target_type: 'UserRole', action: 'update' }.freeze,
update_ip_block: { target_type: 'IpBlock', action: 'update' }.freeze, update_ip_block: { target_type: 'IpBlock', action: 'update' }.freeze,
unblock_email_account: { target_type: 'Account', action: 'unblock_email' }.freeze, unblock_email_account: { target_type: 'Account', action: 'unblock_email' }.freeze,

View file

@ -176,6 +176,7 @@ en:
action_logs: action_logs:
action_types: action_types:
approve_appeal: Approve Appeal approve_appeal: Approve Appeal
approve_remote_account: Approve Remote Account
approve_user: Approve User approve_user: Approve User
assigned_to_self_report: Assign Report assigned_to_self_report: Assign Report
change_email_user: Change E-mail for User change_email_user: Change E-mail for User
@ -210,9 +211,12 @@ en:
enable_custom_emoji: Enable Custom Emoji enable_custom_emoji: Enable Custom Emoji
enable_sign_in_token_auth_user: Enable E-mail Token Authentication for User enable_sign_in_token_auth_user: Enable E-mail Token Authentication for User
enable_user: Enable User enable_user: Enable User
force_cw_status: Add CW to Post
force_sensitive_status: Add Sensitive Flag to Post
memorialize_account: Memorialize Account memorialize_account: Memorialize Account
promote_user: Promote User promote_user: Promote User
reject_appeal: Reject Appeal reject_appeal: Reject Appeal
reject_remote_account: Reject Remote Account
reject_user: Reject User reject_user: Reject User
remove_avatar_user: Remove Avatar remove_avatar_user: Remove Avatar
reopen_report: Reopen Report reopen_report: Reopen Report

View file

@ -173,6 +173,7 @@ ja:
action_logs: action_logs:
action_types: action_types:
approve_appeal: 抗議を承認 approve_appeal: 抗議を承認
approve_remote_account: リモートアカウントの承認
approve_user: ユーザーの承認 approve_user: ユーザーの承認
assigned_to_self_report: 通報の担当者に設定 assigned_to_self_report: 通報の担当者に設定
change_email_user: ユーザーのメールアドレスを変更 change_email_user: ユーザーのメールアドレスを変更
@ -207,9 +208,12 @@ ja:
enable_custom_emoji: カスタム絵文字を有効化 enable_custom_emoji: カスタム絵文字を有効化
enable_sign_in_token_auth_user: メールトークンのユーザー認証を有効にする enable_sign_in_token_auth_user: メールトークンのユーザー認証を有効にする
enable_user: ユーザーを有効化 enable_user: ユーザーを有効化
force_cw_status: 投稿に警告文を追加
force_sensitive_status: 投稿を閲覧注意に変更
memorialize_account: 追悼アカウント化 memorialize_account: 追悼アカウント化
promote_user: ユーザーを昇格 promote_user: ユーザーを昇格
reject_appeal: 抗議を却下 reject_appeal: 抗議を却下
reject_remote_account: リモートアカウントを拒否
reject_user: ユーザーを拒否 reject_user: ユーザーを拒否
remove_avatar_user: アイコンを削除 remove_avatar_user: アイコンを削除
reopen_report: 未解決に戻す reopen_report: 未解決に戻す