{{ 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 "VouchRelationship" (index $root.VouchRelationships (did $comment.Self.Did)) ) }}
{{ template "topLevelComment" $params }}
{{ range $index, $reply := $comment.Replies }}
{{ template "replyComment" (dict "RepoInfo" $root.RepoInfo "LoggedInUser" $root.LoggedInUser "Issue" $root.Issue "Comment" $reply "VouchRelationship" (index $root.VouchRelationships (did $reply.Did)) ) }}
{{ end }}
{{ template "repo/issues/fragments/replyIssueCommentPlaceholder" $params }}
{{ end }} {{ define "topLevelComment" }}
{{ template "user/fragments/picLink" (list .Comment.Did "size-8 mr-1" .VouchRelationship) }}
{{ template "repo/issues/fragments/issueCommentHeader" . }} {{ template "repo/issues/fragments/issueCommentBody" . }}
{{ end }} {{ define "replyComment" }}
{{ template "user/fragments/picLink" (list .Comment.Did "size-8 mr-1" .VouchRelationship) }}
{{ template "repo/issues/fragments/issueCommentHeader" . }} {{ template "repo/issues/fragments/issueCommentBody" . }}
{{ end }}