{{$root := ctx.RootData -}} {{$repo := $root.Repository -}} {{$repoLink := $root.RepoLink -}} {{$issue := $root.Issue -}} {{$canWrite := or $root.Permission.IsAdmin $root.HasIssuesOrPullsWritePermission -}} {{$signedUserID := or $root.SignedUserID NIL -}} {{range $comment := $.comments}} {{$createdStr:= DateUtils.TimeSince $comment.CreatedUnix}}
{{if $comment.OriginalAuthor}} {{ctx.AvatarUtils.Avatar nil}} {{else}} {{template "shared/user/avatarlink" dict "user" $comment.Poster}} {{end}}
{{if $comment.OriginalAuthor}} {{svg (MigrationIcon $repo.GetOriginalURLHostname)}} {{$comment.OriginalAuthor}} {{ctx.Locale.Tr "repo.issues.commented_at" $comment.HashTag $createdStr}} {{if $repo.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" $repo.OriginalURL $repo.GetOriginalURLHostname}}) {{end}} {{else}} {{template "shared/user/namelink" $comment.Poster}} {{ctx.Locale.Tr "repo.issues.commented_at" $comment.HashTag $createdStr}} {{end}}
{{if $comment.Invalidated}} {{$referenceUrl := printf "%s#%s" $issue.Link $comment.HashTag}} {{ctx.Locale.Tr "repo.issues.review.outdated"}} {{end}} {{if $comment.Review}} {{if eq $comment.Review.Type 0}}
{{ctx.Locale.Tr "repo.issues.review.pending"}}
{{else}}
{{ctx.Locale.Tr "repo.issues.review.review"}}
{{end}} {{end}} {{if not $repo.IsArchived}} {{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $repoLink $comment.ID)}} {{end}} {{template "repo/issue/view_content/context_menu" dict "ConvContentType" "issue_comment" "ConvContentPage" "pr-files" "ConvContentItem" $comment}}
{{$doerIsPoster := eq $signedUserID $comment.PosterID}}
{{if $comment.RenderedContent}} {{$comment.RenderedContent}} {{else}} {{ctx.Locale.Tr "repo.issues.no_content"}} {{end}}
{{$comment.Content}}
{{if $comment.Attachments}} {{template "repo/issue/view_content/attachments" dict "Attachments" $comment.Attachments "RenderedContent" $comment.RenderedContent}} {{end}}
{{$reactions := $comment.Reactions.GroupByType}} {{if $reactions}} {{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/comments/%d/reactions" $repoLink $comment.ID) "Reactions" $reactions}} {{end}}
{{end}}