{{if len .comments}} {{$root := ctx.RootData}} {{$comments := $.comments}} {{$firstComment := index $comments 0}} {{$resolved := $firstComment.IsResolved}} {{$invalid := $firstComment.Invalidated}} {{$resolveDoer := $firstComment.ResolveDoer}} {{$hasReview := and $firstComment.Review}} {{$isReviewPending := and $hasReview (eq $firstComment.Review.Type 0)}} {{$referenceUrl := printf "%s#%s" $root.Issue.Link $firstComment.HashTag}} {{$canAddComment := and $root.SignedUserID (not $root.Repository.IsArchived)}} {{$canMarkAsResolved := and $root.CanMarkConversation $hasReview (not $isReviewPending)}} {{$repoLink := $root.RepoLink}}
{{if $resolved}}
{{svg "octicon-check"}} {{$resolveDoer.Name}} {{ctx.Locale.Tr "repo.issues.review.resolved_by"}} {{if $invalid}} {{ctx.Locale.Tr "repo.issues.review.outdated"}} {{end}}
{{end}}
{{template "repo/diff/comments" dict "comments" $comments}}
{{if $canMarkAsResolved}} {{end}} {{if $canAddComment}} {{end}}
{{template "repo/diff/comment_form" dict "ReplyReviewComment" $firstComment}}
{{else}} {{template "repo/diff/conversation_outdated"}} {{end}}