From de0b2d4e32a8507bd72a68743d51570c79a43bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=99=BA=E8=B6=85?= <1012112796@qq.com> Date: Wed, 3 Jun 2020 14:09:03 +0800 Subject: [PATCH] bug: fix wrong poster message for code comment on Pull view (#11721) As title, maybe fix one of issue in #11705 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: techknowlogick --- templates/repo/issue/view_content/comments.tmpl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index b22706110..fdb015b59 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -475,13 +475,19 @@ {{range $comms}} {{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }}
- - - + {{if not .OriginalAuthor }} + + + + {{end}}
- {{.Poster.GetDisplayName}} + {{if .OriginalAuthor }} + {{ .OriginalAuthor }} {{if $.Repository.OriginalURL}}({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}} + {{else}} + {{.Poster.GetDisplayName}} + {{end}} {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdSubStr | Safe}}