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/issue/view_content.tmpl | 188 +++++++++++++++++++++++++++++++++ 1 file changed, 188 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 0000000..683dea8 --- /dev/null +++ b/templates/repo/issue/view_content.tmpl @@ -0,0 +1,188 @@ +
+ + + + + + + + {{$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