forked from Gitlink/forgeplus
fix: some bug
This commit is contained in:
parent
21d4751327
commit
7ba45bc866
|
@ -12,6 +12,6 @@ if trend.trend_type == "Issue"
|
|||
elsif trend.trend_type == "VersionRelease"
|
||||
json.partial! "version_releases/simple_version_release", locals: {version: trend.trend}
|
||||
else
|
||||
json.name trend.trend.title
|
||||
json.created_at format_time(trend.trend.created_at)
|
||||
json.name trend.trend&.title
|
||||
json.created_at format_time(trend.trend&.created_at)
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ json.format_time target.created_at.strftime("%Y-%m-%d")
|
|||
json.name user.try(:show_real_name)
|
||||
json.login user.try(:login)
|
||||
json.image_url url_to_avatar(user)
|
||||
json.is_current_user current_user.try(:id) == target.user_id
|
||||
json.is_current_user current_user.try(:id) == user.id
|
||||
json.is_watch current_user&.watched?(user)
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
json.count @watchers_count
|
||||
json.users do
|
||||
json.array! @watchers do |watcher|
|
||||
json.partial! "/users/watch_user_detail", locals: {target: watcher, user: watcher.watchable}
|
||||
json.partial! "/users/watch_user_detail", target: watcher, user: watcher.watchable
|
||||
end
|
||||
# json.partial! "/users/watch_user_detail", collection: @watchers, as: :target
|
||||
end
|
|
@ -15,7 +15,7 @@ zh-CN:
|
|||
'refused': '已拒绝'
|
||||
'agreed': '已同意'
|
||||
trend:
|
||||
Issue: 工单
|
||||
Issue: 易修(Issue)
|
||||
PullRequest: 合并请求
|
||||
VersionRelease: 版本发布
|
||||
create: 创建了
|
||||
|
|
Loading…
Reference in New Issue