summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
author赵智超 <1012112796@qq.com>2020-06-03 14:09:03 +0800
committerGitHub <noreply@github.com>2020-06-03 02:09:03 -0400
commitde0b2d4e32a8507bd72a68743d51570c79a43bb2 (patch)
treee3beb924512ee7d7c75063508bb3fff0b5016012 /templates
parent8e035f81c01ba6c1ccf8952ffad37bef063aad2d (diff)
downloadgitea-de0b2d4e32a8507bd72a68743d51570c79a43bb2.tar.gz
gitea-de0b2d4e32a8507bd72a68743d51570c79a43bb2.zip
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 <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content/comments.tmpl14
1 files changed, 10 insertions, 4 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index b227061109..fdb015b59e 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 }}
<div class="comment" id="{{.HashTag}}">
- <a class="avatar">
- <img src="{{.Poster.RelAvatarLink}}">
- </a>
+ {{if not .OriginalAuthor }}
+ <a class="avatar">
+ <img src="{{.Poster.RelAvatarLink}}">
+ </a>
+ {{end}}
<div class="content">
<div class="code-comment-content">
<span class="text grey">
- <a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
+ {{if .OriginalAuthor }}
+ <span class="text black"><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span><span class="text grey"> {{if $.Repository.OriginalURL}}</span><span class="text migrate">({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}}</span>
+ {{else}}
+ <a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
+ {{end}}
{{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdSubStr | Safe}}
<div class="text">
<div class="render-content markdown">