From 65aa53fc52ff15efe54df4147564828d535837f8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 11 Oct 2024 12:27:00 +0200 Subject: Adding upstream version 8.0.3. Signed-off-by: Daniel Baumann --- templates/repo/issue/view_content.tmpl | 187 +++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 templates/repo/issue/view_content.tmpl (limited to 'templates/repo/issue/view_content.tmpl') diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl new file mode 100644 index 00000000..543191e0 --- /dev/null +++ b/templates/repo/issue/view_content.tmpl @@ -0,0 +1,187 @@ +
+ + + + + + + + {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix ctx.Locale}} +
+
+
+ {{if .Issue.OriginalAuthor}} + + {{ctx.AvatarUtils.Avatar nil 40}} + + {{else}} + + {{ctx.AvatarUtils.Avatar .Issue.Poster 40}} + + {{end}} +
+
+
+ {{if .Issue.OriginalAuthor}} + + {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} + {{.Issue.OriginalAuthor}} + + + {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}} + + + {{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname}}){{end}} + + {{else}} + + {{ctx.AvatarUtils.Avatar .Issue.Poster 24}} + + + {{template "shared/user/authorlink" .Issue.Poster}} + {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}} + + {{end}} +
+
+ {{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true "IsPull" .Issue.IsPull}} + {{if not $.Repository.IsArchived}} + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}} + {{end}} + {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}} +
+
+
+
+ {{if .Issue.RenderedContent}} + {{.Issue.RenderedContent}} + {{else}} + {{ctx.Locale.Tr "repo.issues.no_content"}} + {{end}} +
+
{{.Issue.Content}}
+
+ {{if .Issue.Attachments}} + {{template "repo/issue/view_content/attachments" dict "Attachments" .Issue.Attachments "RenderedContent" .Issue.RenderedContent}} + {{end}} +
+ {{$reactions := .Issue.Reactions.GroupByType}} + {{if $reactions}} + {{template "repo/issue/view_content/reactions" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}} + {{end}} +
+
+ + {{template "repo/issue/view_content/comments" .}} + + {{if and .Issue.IsPull (not $.Repository.IsArchived)}} + {{template "repo/issue/view_content/pull".}} + {{end}} + + {{if .IsSigned}} + {{if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived)}} +
+ + {{ctx.AvatarUtils.Avatar .SignedUser 40}} + +
+
+ {{template "repo/issue/comment_tab" .}} + {{.CsrfTokenHtml}} + +
+
+
+ {{else if .Repository.IsArchived}} +
+ {{if .Issue.IsPull}} + {{ctx.Locale.Tr "repo.archive.pull.nocomment"}} + {{else}} + {{ctx.Locale.Tr "repo.archive.issue.nocomment"}} + {{end}} +
+ {{end}} + {{else}} {{/* not .IsSigned */}} + {{if .Repository.IsArchived}} +
+ {{if .Issue.IsPull}} + {{ctx.Locale.Tr "repo.archive.pull.nocomment"}} + {{else}} + {{ctx.Locale.Tr "repo.archive.issue.nocomment"}} + {{end}} +
+ {{else}} +
+ {{ctx.Locale.Tr "repo.issues.sign_in_require_desc" .SignInLink}} +
+ {{end}} + {{end}}{{/* end if: .IsSigned */}} +
+
+ + {{template "repo/issue/view_content/sidebar" .}} +
+ + + +{{template "repo/issue/view_content/reference_issue_dialog" .}} + +
+ {{ctx.Locale.Tr "repo.issues.no_content"}} +
+ + -- cgit v1.2.3