mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 20:55:46 +08:00
Merge branch 'pre_trustie_server' into trustie_server
This commit is contained in:
@@ -27,18 +27,10 @@ json.milestone do
|
||||
end
|
||||
end
|
||||
json.author do
|
||||
if issue.user.present?
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: issue.user}
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: issue.user}
|
||||
end
|
||||
json.changer do
|
||||
if issue.changer.present?
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: issue.changer}
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: issue.changer}
|
||||
end
|
||||
json.assigners issue.show_assigners.each do |assigner|
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: assigner}
|
||||
|
||||
@@ -33,11 +33,7 @@ json.time_scale issue.time_scale
|
||||
json.child_count issue.child_count
|
||||
|
||||
json.author do
|
||||
if issue.user.present?
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: issue.user}
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: issue.user}
|
||||
end
|
||||
json.assigners issue.show_assigners.each do |assigner|
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: assigner}
|
||||
|
||||
@@ -2,17 +2,13 @@ json.id journal.id
|
||||
json.is_journal_detail journal.is_journal_detail?
|
||||
json.created_at journal.created_on.strftime("%Y-%m-%d %H:%M")
|
||||
json.updated_at journal.updated_on.strftime("%Y-%m-%d %H:%M")
|
||||
json.user do
|
||||
if journal.user.present?
|
||||
json.partial! "api/v1/users/simple_user", user: journal.user
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
json.user do
|
||||
json.partial! "api/v1/users/simple_user", user: journal.user
|
||||
end
|
||||
if journal.is_journal_detail?
|
||||
detail = journal.journal_details.take
|
||||
json.operate_category detail.property == "attr" ? detail.prop_key : detail.property
|
||||
json.operate_content journal.is_journal_detail? ? journal.operate_content : nil
|
||||
json.operate_category @issue.pm_issue_type.nil? ? detail.property == "attr" ? detail.prop_key : detail.property : journal.pm_operate_category
|
||||
json.operate_content journal.is_journal_detail? ? @issue.pm_issue_type.nil? ? journal.operate_content : journal.pm_operate_content : nil
|
||||
else
|
||||
json.notes journal.notes
|
||||
json.comments_count journal.comments_count
|
||||
|
||||
@@ -4,6 +4,9 @@ if user.present?
|
||||
json.name user.real_name
|
||||
json.login user.login
|
||||
json.image_url Rails.application.config_for(:configuration)['platform_url'] + "/" + url_to_avatar(user).to_s
|
||||
else
|
||||
json.nil!
|
||||
else
|
||||
json.name "已注销"
|
||||
json.login user&.login
|
||||
json.type "User"
|
||||
json.image_url Rails.application.config_for(:configuration)['platform_url'] + "/" + "images/account/del.svg"
|
||||
end
|
||||
Reference in New Issue
Block a user