From 16a71a383b2e5b938a66ae6cedb36cc6526066b7 Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 30 Jul 2025 16:23:41 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9A=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user_action.rb | 2 +- app/views/admins/shared/_sidebar.html.erb | 2 +- app/views/admins/user_actions/index.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/user_action.rb b/app/models/user_action.rb index 7723fb12e..0dba93da4 100644 --- a/app/models/user_action.rb +++ b/app/models/user_action.rb @@ -31,7 +31,7 @@ class UserAction < ApplicationRecord def action_name case action_type - when "DestroyUser" then "用户注销" + when "DestroyUser" then "删除用户" when "DestroyProject" then "删除项目" when "Login" then "登录" when "Logout" then "退出登录" diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb index 0c9b9c495..bfbce0a8e 100644 --- a/app/views/admins/shared/_sidebar.html.erb +++ b/app/views/admins/shared/_sidebar.html.erb @@ -26,7 +26,7 @@
  • <%= sidebar_item(admins_faqs_path, 'FAQ', icon: 'question-circle', controller: 'admins-faqs', has_permission: current_user.admin? || current_user.business?) %>
  • <%= sidebar_item(admins_nps_path, 'NPS用户调研', icon: 'question-circle', controller: 'admins-nps', has_permission: current_user.admin? || current_user.business?) %>
  • <%= sidebar_item(admins_feedbacks_path, '用户反馈', icon: 'question-circle', controller: 'admins-feedbacks', has_permission: current_user.admin? || current_user.business?) %>
  • -
  • <%= sidebar_item(admins_user_actions_path, '操作记录', icon: 'pencil-square', controller: 'admins-user_actions', has_permission: current_user.admin?) %>
  • +
  • <%= sidebar_item(admins_user_actions_path, '操作日志', icon: 'pencil-square', controller: 'admins-user_actions', has_permission: current_user.admin?) %>
  • <%= sidebar_item(admins_system_notifications_path, '系统公告配置', icon: 'bell', controller: 'admins-system_notifications', has_permission: current_user.admin? || current_user.business?) %>
  • <% end %> diff --git a/app/views/admins/user_actions/index.html.erb b/app/views/admins/user_actions/index.html.erb index c48c26c3d..3be99282a 100644 --- a/app/views/admins/user_actions/index.html.erb +++ b/app/views/admins/user_actions/index.html.erb @@ -5,7 +5,7 @@
    <%= form_tag(admins_user_actions_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %> 操作类型: - <% action_type_options = [['自定义',''],['用户注销','DestroyUser'], ['删除项目', 'DestroyProject'], ['删除组织', 'DestroyOrganization']] %> + <% action_type_options = [['自定义',''],['删除用户','DestroyUser'], ['删除项目', 'DestroyProject'], ['删除组织', 'DestroyOrganization']] %> <%= select_tag(:action_type_select, options_for_select(action_type_options), class: 'form-control') %> <%= text_field_tag(:action_type, params[:action_type], class: 'form-control col-sm-2 ml-3',style: 'display:;', placeholder: '自定义操作类型检索') %> <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '操作人用户名/邮箱/手机号检索') %> From 532b924ff1d00ac748388c302b287c24433f0abf Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 30 Jul 2025 16:32:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=88=97=E8=A1=A8project=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/api/v1/issues/_simple_detail.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/api/v1/issues/_simple_detail.json.jbuilder b/app/views/api/v1/issues/_simple_detail.json.jbuilder index 6207ab80b..5782d8661 100644 --- a/app/views/api/v1/issues/_simple_detail.json.jbuilder +++ b/app/views/api/v1/issues/_simple_detail.json.jbuilder @@ -1,4 +1,4 @@ -json.(issue, :id, :subject, :project_issues_index) +json.(issue, :id, :subject, :project_issues_index, :project_id) json.blockchain_token_num (Site.has_blockchain? && issue.project&.use_blockchain) ? issue.blockchain_token_num : nil json.created_at issue.created_on.strftime("%Y-%m-%d %H:%M") json.updated_at issue.updated_on.strftime("%Y-%m-%d %H:%M") From 2229c732cae2894e968415478681293980ec30f3 Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 30 Jul 2025 16:48:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=88=97=E8=A1=A8project=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/api/v1/issues/_simple_detail.json.jbuilder | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/api/v1/issues/_simple_detail.json.jbuilder b/app/views/api/v1/issues/_simple_detail.json.jbuilder index 5782d8661..0c27cc2c6 100644 --- a/app/views/api/v1/issues/_simple_detail.json.jbuilder +++ b/app/views/api/v1/issues/_simple_detail.json.jbuilder @@ -1,4 +1,11 @@ json.(issue, :id, :subject, :project_issues_index, :project_id) +json.project do + if issue.project.present? + json.partial! "api/v1/projects/simple_detail", locals: {project: issue.project} + else + json.nil! + end +end json.blockchain_token_num (Site.has_blockchain? && issue.project&.use_blockchain) ? issue.blockchain_token_num : nil json.created_at issue.created_on.strftime("%Y-%m-%d %H:%M") json.updated_at issue.updated_on.strftime("%Y-%m-%d %H:%M")