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 --- .../repo/issue/view_content/conversation.tmpl | 137 +++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 templates/repo/issue/view_content/conversation.tmpl (limited to 'templates/repo/issue/view_content/conversation.tmpl') diff --git a/templates/repo/issue/view_content/conversation.tmpl b/templates/repo/issue/view_content/conversation.tmpl new file mode 100644 index 0000000..c788a61 --- /dev/null +++ b/templates/repo/issue/view_content/conversation.tmpl @@ -0,0 +1,137 @@ +{{$invalid := (index .comments 0).Invalidated}} +{{$resolved := (index .comments 0).IsResolved}} +{{$resolveDoer := (index .comments 0).ResolveDoer}} +{{$isNotPending := (not (eq (index .comments 0).Review.Type 0))}} +
+
+
+ {{(index .comments 0).TreePath}} + {{if $invalid}} + + {{ctx.Locale.Tr "repo.issues.review.outdated"}} + + {{end}} +
+
+ {{if or $invalid $resolved}} + + + {{end}} +
+
+ {{$diff := (CommentMustAsDiff ctx (index .comments 0))}} + {{if $diff}} + {{$file := (index $diff.Files 0)}} +
+
+
+ + + {{template "repo/diff/section_unified" dict "file" $file "root" $}} + +
+
+
+
+ {{end}} +
+
+ {{range .comments}} + {{$createdSubStr:= TimeSinceUnix .CreatedUnix ctx.Locale}} +
+
+
+
+ {{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 "IsPull" $.Issue.IsPull}} + {{if not $.Repository.IsArchived}} + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} + {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "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 "ctxData" $ "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 $isNotPending}} + + {{end}} + {{if and $.SignedUserID (not $.Repository.IsArchived)}} + + {{end}} +
+
+ {{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index .comments 0).ReviewID "root" $ "comment" (index .comments 0)}} +
+
-- cgit v1.2.3