summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content
diff options
context:
space:
mode:
author赵智超 <1012112796@qq.com>2020-10-14 20:11:11 +0800
committerGitHub <noreply@github.com>2020-10-14 13:11:11 +0100
commit97980146c52c1cb27e18f60fcd876519d53dad2f (patch)
treeb691cbcabd95e16f5b3d994164611df2b21d1f75 /templates/repo/issue/view_content
parente70df67d4792826b51f0d2186816bf7651d1653d (diff)
downloadgitea-97980146c52c1cb27e18f60fcd876519d53dad2f.tar.gz
gitea-97980146c52c1cb27e18f60fcd876519d53dad2f.zip
Show original author's reviews on pull summary box (#13127)
follow #12039, show original author's reviews by other way. fix #11705. Signed-off-by: a1012112796 <1012112796@qq.com>
Diffstat (limited to 'templates/repo/issue/view_content')
-rw-r--r--templates/repo/issue/view_content/pull.tmpl20
-rw-r--r--templates/repo/issue/view_content/sidebar.tmpl14
2 files changed, 32 insertions, 2 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index d043c269ee..a67783ebb1 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -1,4 +1,4 @@
-{{if .PullReviewers }}
+{{if or .PullReviewers .OriginalReviews }}
<div class="comment box">
<div class="content">
<div class="ui segment">
@@ -54,6 +54,24 @@
</div>
</div>
{{end}}
+ {{range .OriginalReviews}}
+ {{ $createdStr:= TimeSinceUnix .UpdatedUnix $.Lang }}
+ <div class="ui divider"></div>
+ <div class="review-item">
+ <div class="review-item-left">
+ <a href="{{$.Repository.OriginalURL}}" class="ui poping up" data-content="{{$.i18n.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname | Safe }}"><span class="text black "><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span></a>
+ </div>
+ <div class="review-item-right">
+ <span class="type-icon text {{if eq .Type 1}}green
+ {{- else if eq .Type 2}}grey
+ {{- else if eq .Type 3}}red
+ {{- else if eq .Type 4}}yellow
+ {{else}}grey{{end}}">
+ {{svg (printf "octicon-%s" .Type.Icon)}}
+ </span>
+ </div>
+ </div>
+ {{end}}
</div>
</div>
</div>
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index a1dbc7ef7f..8a89f2b20c 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -49,7 +49,7 @@
</div>
<div class="ui assignees list">
- <span class="no-select item {{if .PullReviewers}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_reviewers"}}</span>
+ <span class="no-select item {{if or .OriginalReviews .PullReviewers}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_reviewers"}}</span>
<div class="selected">
{{range .PullReviewers}}
<div class="item" style="margin-bottom: 10px;">
@@ -73,6 +73,18 @@
</span>
</div>
{{end}}
+ {{range .OriginalReviews}}
+ <div class="item" style="margin-bottom: 10px;">
+ <a href="{{$.Repository.OriginalURL}}" class="ui poping up" data-content="{{$.i18n.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname | Safe }}"><span class="text black "><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span></a>
+ <span class="ui right type-icon text {{if eq .Type 1}}green
+ {{- else if eq .Type 2}}grey
+ {{- else if eq .Type 3}}red
+ {{- else if eq .Type 4}}yellow
+ {{- else}}grey{{end}} right ">
+ {{svg (printf "octicon-%s" .Type.Icon)}}
+ </span>
+ </div>
+ {{end}}
</div>
</div>
<div class="ui divider"></div>