From dd136858f1ea40ad3c94191d647487fa4f31926c 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.0. Signed-off-by: Daniel Baumann --- templates/shared/issuelist.tmpl | 163 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 templates/shared/issuelist.tmpl (limited to 'templates/shared/issuelist.tmpl') diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl new file mode 100644 index 0000000..f96c182 --- /dev/null +++ b/templates/shared/issuelist.tmpl @@ -0,0 +1,163 @@ +
+ {{$approvalCounts := .ApprovalCounts}} + {{range .Issues}} +
+ +
+ {{if $.CanWriteIssuesOrPulls}} + + {{end}} + {{template "shared/issueicon" .}} +
+ +
+
+
+ {{RenderEmoji $.Context .Title | RenderCodeBlock}} + {{if .IsPull}} + {{if (index $.CommitStatuses .PullRequest.ID)}} + {{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID)}} + {{end}} + {{end}} + + {{range .Labels}} + {{RenderLabel $.Context ctx.Locale .}} + {{end}} + +
+ {{if or .TotalTrackedTime .Assignees .NumComments}} +
+ {{if .TotalTrackedTime}} +
+ {{svg "octicon-clock" 16}} + {{.TotalTrackedTime | Sec2Time}} +
+ {{end}} + {{if .Assignees}} +
+ {{range .Assignees}} + + {{ctx.AvatarUtils.Avatar . 20}} + + {{end}} +
+ {{end}} + {{if .NumComments}} + + {{end}} +
+ {{end}} +
+
+ + {{if eq $.listType "dashboard"}} + {{.Repo.FullName}}#{{.Index}} + {{else}} + #{{.Index}} + {{end}} + + {{$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 .IsPull}} + + {{end}} + {{if and .Milestone (ne $.listType "milestone")}} + + {{svg "octicon-milestone" 14}} + {{.Milestone.Name}} + + {{end}} + {{if .Project}} + + {{svg .Project.IconName 14}} + {{.Project.Title}} + + {{end}} + {{if .Ref}} + + {{svg "octicon-git-branch" 14}} + {{index $.IssueRefEndNames .ID}} + + {{end}} + {{$tasks := .GetTasks}} + {{if gt $tasks 0}} + {{$tasksDone := .GetTasksDone}} + + {{svg "octicon-checklist" 14}}{{$tasksDone}} / {{$tasks}} + + + {{end}} + {{if ne .DeadlineUnix 0}} + + + {{svg "octicon-calendar" 14}} + {{DateTime "short" (.DeadlineUnix.FormatDate)}} + + + {{end}} + {{if .IsPull}} + {{$approveOfficial := call $approvalCounts .ID "approve"}} + {{$rejectOfficial := call $approvalCounts .ID "reject"}} + {{$waitingOfficial := call $approvalCounts .ID "waiting"}} + {{if gt $approveOfficial 0}} + + {{svg "octicon-check" 14}} + {{ctx.Locale.TrN $approveOfficial "repo.pulls.approve_count_1" "repo.pulls.approve_count_n" $approveOfficial}} + + {{end}} + {{if gt $rejectOfficial 0}} + + {{svg "octicon-diff" 14}} + {{ctx.Locale.TrN $rejectOfficial "repo.pulls.reject_count_1" "repo.pulls.reject_count_n" $rejectOfficial}} + + {{end}} + {{if gt $waitingOfficial 0}} + + {{svg "octicon-eye" 14}} + {{ctx.Locale.TrN $waitingOfficial "repo.pulls.waiting_count_1" "repo.pulls.waiting_count_n" $waitingOfficial}} + + {{end}} + {{if and (not .PullRequest.HasMerged) .PullRequest.ConflictedFiles}} + + {{svg "octicon-x" 14}} + {{ctx.Locale.TrN (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n" (len .PullRequest.ConflictedFiles)}} + + {{end}} + {{end}} +
+
+
+ {{end}} + {{if .IssueIndexerUnavailable}} +
+

{{ctx.Locale.Tr "search.keyword_search_unavailable"}}

+
+ {{end}} +
+{{template "base/paginate" .}} -- cgit v1.2.3