diff options
author | kolaente <konrad@kola-entertainments.de> | 2018-11-22 14:17:36 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-11-22 15:17:36 +0200 |
commit | 0dcf31ae49707c10c1b14e112e0831e920cb6e16 (patch) | |
tree | fae417a40cfad5dc19d625e797628cc5c6ebbb8f /templates/repo/issue | |
parent | cef0f12c51cee9edeb636fd2174f8d4eb00ea955 (diff) | |
download | gitea-0dcf31ae49707c10c1b14e112e0831e920cb6e16.tar.gz gitea-0dcf31ae49707c10c1b14e112e0831e920cb6e16.zip |
Show review summary in pull requests (#5132)
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/view_content/pull.tmpl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 92bfc86cb4..174937f902 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -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 |