{{if len .comments}} {{$comment := index .comments 0}} {{$invalid := $comment.Invalidated}} {{$resolved := $comment.IsResolved}} {{$resolveDoer := $comment.ResolveDoer}} {{$hasReview := and $comment.Review}} {{$isReviewPending := and $hasReview (eq $comment.Review.Type 0)}}
{{$comment.TreePath}} {{if $invalid}} {{ctx.Locale.Tr "repo.issues.review.outdated"}} {{end}}
{{if or $invalid $resolved}} {{end}}
{{$diff := (CommentMustAsDiff ctx $comment)}} {{if $diff}} {{$file := (index $diff.Files 0)}}
{{template "repo/diff/section_unified" dict "file" $file "root" $}}
{{end}}
{{range .comments}} {{$createdSubStr:= DateUtils.TimeSince .CreatedUnix}}
{{if not .OriginalAuthor}} {{ctx.AvatarUtils.Avatar .Poster 20}} {{end}} {{if .OriginalAuthor}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{.OriginalAuthor}} {{if $.Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}) {{end}} {{else}} {{template "shared/user/authorlink" .Poster}} {{end}} {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdSubStr}}
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} {{if not $.Repository.IsArchived}} {{template "repo/issue/view_content/add_reaction" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} {{template "repo/issue/view_content/context_menu" dict "item" . "delete" true "issue" true "diff" true "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} {{end}}
{{if .RenderedContent}} {{.RenderedContent}} {{else}} {{ctx.Locale.Tr "repo.issues.no_content"}} {{end}}
{{.Content}}
{{if .Attachments}} {{template "repo/issue/view_content/attachments" dict "Attachments" .Attachments "RenderedContent" .RenderedContent}} {{end}}
{{$reactions := .Reactions.GroupByType}} {{if $reactions}} {{template "repo/issue/view_content/reactions" dict "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}} {{end}}
{{end}}
{{if $resolved}}
{{svg "octicon-check" 16 "tw-mr-1"}} {{$resolveDoer.Name}} {{ctx.Locale.Tr "repo.issues.review.resolved_by"}}
{{end}}
{{if and $.CanMarkConversation $hasReview (not $isReviewPending)}} {{end}} {{if and $.SignedUserID (not $.Repository.IsArchived)}} {{end}}
{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" $comment.ReviewID "root" $ "comment" $comment}}
{{else}} {{template "repo/diff/conversation_outdated"}} {{end}}