1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Show review summary in pull requests (#5132)

This commit is contained in:
kolaente
2018-11-22 14:17:36 +01:00
committed by Lauris BH
parent cef0f12c51
commit 0dcf31ae49
8 changed files with 179 additions and 2 deletions

View File

@@ -1,3 +1,38 @@
{{if gt (len .PullReviewersWithType) 0}}
<div class="comment box">
<div class="content">
<div class="ui segment">
<h4>{{$.i18n.Tr "repo.issues.review.reviewers"}}</h4>
{{range .PullReviewersWithType}}
{{ $createdStr:= TimeSinceUnix .ReviewUpdatedUnix $.Lang }}
<div class="ui divider"></div>
<div class="review-item">
<span class="type-icon text {{if eq .Type 1}}green
{{else if eq .Type 2}}grey
{{else if eq .Type 3}}red
{{else}}grey{{end}}">
<span class="octicon octicon-{{.Type.Icon}}"></span>
</span>
<a class="ui avatar image" href="{{.HomeLink}}">
<img src="{{.RelAvatarLink}}">
</a>
<span class="text grey"><a href="{{.HomeLink}}">{{.Name}}</a>
{{if eq .Type 1}}
{{$.i18n.Tr "repo.issues.review.approve" $createdStr | Safe}}
{{else if eq .Type 2}}
{{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}}
{{else if eq .Type 3}}
{{$.i18n.Tr "repo.issues.review.reject" $createdStr | Safe}}
{{else}}
{{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}}
{{end}}
</span>
</div>
{{end}}
</div>
</div>
</div>
{{end}}
<div class="comment merge box">
<a class="avatar text
{{if .Issue.PullRequest.HasMerged}}purple