From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/repo/diff/comments.tmpl | 75 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 templates/repo/diff/comments.tmpl (limited to 'templates/repo/diff/comments.tmpl') diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl new file mode 100644 index 0000000..2e0c85d --- /dev/null +++ b/templates/repo/diff/comments.tmpl @@ -0,0 +1,75 @@ +{{range .comments}} + +{{$createdStr:= TimeSinceUnix .CreatedUnix ctx.Locale}} +
+ {{if .OriginalAuthor}} + {{ctx.AvatarUtils.Avatar nil}} + {{else}} + {{template "shared/user/avatarlink" dict "user" .Poster}} + {{end}} +
+
+
+ {{if .OriginalAuthor}} + + {{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}} + {{.OriginalAuthor}} + + + {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} + + + {{if $.root.Repository.OriginalURL}} + ({{ctx.Locale.Tr "repo.migrated_from" $.root.Repository.OriginalURL $.root.Repository.GetOriginalURLHostname}}) + {{end}} + + {{else}} + + {{template "shared/user/namelink" .Poster}} + {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} + + {{end}} +
+
+ {{if .Invalidated}} + {{$referenceUrl := printf "%s#%s" $.root.Issue.Link .HashTag}} + + {{ctx.Locale.Tr "repo.issues.review.outdated"}} + + {{end}} + {{if and .Review}} + {{if eq .Review.Type 0}} +
+ {{ctx.Locale.Tr "repo.issues.review.pending"}} +
+ {{else}} +
+ {{ctx.Locale.Tr "repo.issues.review.review"}} +
+ {{end}} + {{end}} + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $.root "ActionURL" (printf "%s/comments/%d/reactions" $.root.RepoLink .ID)}} + {{template "repo/issue/view_content/context_menu" dict "ctxData" $.root "item" . "delete" true "issue" false "diff" true "IsCommentPoster" (and $.root.IsSigned (eq $.root.SignedUserID .PosterID))}} +
+
+
+
+ {{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 "ctxData" $.root "ActionURL" (printf "%s/comments/%d/reactions" $.root.RepoLink .ID) "Reactions" $reactions}} + {{end}} +
+
+{{end}} -- cgit v1.2.3