aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/list.tmpl
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-03-06 03:44:06 +0000
committerGitHub <noreply@github.com>2020-03-06 03:44:06 +0000
commit80db44267ccb688c596e8375523af5cd92864d87 (patch)
treeb10136ec813c23e18ab30085a0b6f0e014550702 /templates/repo/issue/list.tmpl
parentf422a115f461472db6892da9142e930c67e63128 (diff)
downloadgitea-80db44267ccb688c596e8375523af5cd92864d87.tar.gz
gitea-80db44267ccb688c596e8375523af5cd92864d87.zip
Add Approval Counts to pulls list (#10238)
* Add Approval Counts to pulls list Add simple approvals counts to pulls lists * Remove non-official counts * Add PR features to milestone_issues.tmpl
Diffstat (limited to 'templates/repo/issue/list.tmpl')
-rw-r--r--templates/repo/issue/list.tmpl11
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 60644409c3..05018bacdd 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -202,6 +202,7 @@
</div>
<div class="issue list">
+ {{ $approvalCounts := .ApprovalCounts}}
{{range .Issues}}
<li class="item">
{{if $.CanWriteIssuesOrPulls}}
@@ -268,6 +269,16 @@
</a>
{{end}}
{{if .IsPull}}
+ {{$approveOfficial := call $approvalCounts .ID "approve"}}
+ {{$rejectOfficial := call $approvalCounts .ID "reject"}}
+ {{if or (gt $approveOfficial 0) (gt $rejectOfficial 0)}}
+ <span class="approvals">{{svg "octicon-check" 16}}
+ {{$.i18n.Tr (TrN $.i18n.Lang $approveOfficial "repo.pulls.approve_count_1" "repo.pulls.approve_count_n") $approveOfficial}}
+ {{if or (gt $rejectOfficial 0)}}
+ <span class="rejects">{{svg "octicon-x" 16}}
+ {{$.i18n.Tr (TrN $.i18n.Lang $rejectOfficial "repo.pulls.reject_count_1" "repo.pulls.reject_count_n") $rejectOfficial}}
+ {{end}}
+ {{end}}
{{if and (not .PullRequest.HasMerged) (gt (len .PullRequest.ConflictedFiles) 0)}}
<span class="conflicting">{{svg "octicon-mirror" 16}} {{$.i18n.Tr (TrN $.i18n.Lang (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n") (len .PullRequest.ConflictedFiles)}}</span>
{{end}}