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/card.tmpl | 78 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 templates/repo/issue/card.tmpl (limited to 'templates/repo/issue/card.tmpl') diff --git a/templates/repo/issue/card.tmpl b/templates/repo/issue/card.tmpl new file mode 100644 index 0000000..0b255d6 --- /dev/null +++ b/templates/repo/issue/card.tmpl @@ -0,0 +1,78 @@ +{{with .Issue}} + {{if eq $.Page.Project.CardType 1}}{{/* Images and Text*/}} + {{$attachments := index $.Page.issuesAttachmentMap .ID}} + {{if $attachments}} +
+ {{range $attachments}} + {{.Name}} + {{end}} +
+ {{end}} + {{end}} +
+
+
+ {{template "shared/issueicon" .}} +
+ {{RenderRefIssueTitle $.Context .Title}} + {{if and $.isPinnedIssueCard $.Page.IsRepoAdmin}} + + {{svg "octicon-x" 16}} + + {{end}} +
+
+ + {{if not $.Page.Repository}}{{.Repo.FullName}}{{end}}#{{.Index}} + {{$timeStr := TimeSinceUnix .GetLastEventTimestamp ctx.Locale}} + {{if .OriginalAuthor}} + {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}} + {{else if gt .Poster.ID 0}} + {{ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}} + {{else}} + {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}} + {{end}} + +
+ {{if .MilestoneID}} + + {{end}} + {{if $.Page.LinkedPRs}} + {{range index $.Page.LinkedPRs .ID}} + + {{end}} + {{end}} + {{$tasks := .GetTasks}} + {{if gt $tasks 0}} +
+ {{svg "octicon-checklist" 16 "tw-mr-1 tw-align-middle"}} + {{.GetTasksDone}} / {{$tasks}} +
+ {{end}} +
+ + {{if or .Labels .Assignees}} +
+
+ {{range .Labels}} + {{RenderLabel ctx ctx.Locale .}} + {{end}} +
+
+ {{range .Assignees}} + {{ctx.AvatarUtils.Avatar . 28}} + {{end}} +
+
+ {{end}} +{{end}} -- cgit v1.2.3