{{ define "repo/issues/fragments/commentList" }}
{{ range $item := .CommentList }} {{ template "commentListing" (list $ .) }} {{ end }}
{{ end }} {{ define "commentListing" }} {{ $root := index . 0 }} {{ $comment := index . 1 }} {{ $params := (dict "RepoInfo" $root.RepoInfo "LoggedInUser" $root.LoggedInUser "Issue" $root.Issue "Comment" $comment.Self) }}
{{ template "topLevelComment" $params }}
{{ range $index, $reply := $comment.Replies }}
{{ template "replyComment" (dict "RepoInfo" $root.RepoInfo "LoggedInUser" $root.LoggedInUser "Issue" $root.Issue "Comment" $reply) }}
{{ end }}
{{ template "repo/issues/fragments/replyIssueCommentPlaceholder" $params }}
{{ end }} {{ define "topLevelComment" }}
{{ template "user/fragments/picLink" (list .Comment.Did "size-8 mr-1") }}
{{ template "repo/issues/fragments/issueCommentHeader" . }} {{ template "repo/issues/fragments/issueCommentBody" . }}
{{ end }} {{ define "replyComment" }}
{{ template "user/fragments/picLink" (list .Comment.Did "size-8 mr-1") }}
{{ template "repo/issues/fragments/issueCommentHeader" . }} {{ template "repo/issues/fragments/issueCommentBody" . }}
{{ end }}