ui: Show git-pull-request icon for closed pull request (#12742)

As title, I think it's more reasonable, and it's the same as GH.

Signed-off-by: a1012112796 <1012112796@qq.com>
tokarchuk/v1.17
赵智超 4 years ago committed by GitHub
parent a755e5adeb
commit b613d70b41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      templates/repo/branch/list.tmpl
  2. 2
      templates/repo/issue/view_title.tmpl

@ -95,9 +95,9 @@
{{if .LatestPullRequest.HasMerged}}
<a href="{{.LatestPullRequest.Issue.HTMLURL}}" class="ui text-label purple mini label">{{svg "octicon-git-merge" 16}} {{$.i18n.Tr "repo.pulls.merged"}}</a>
{{else if .LatestPullRequest.Issue.IsClosed}}
<a href="{{.LatestPullRequest.Issue.HTMLURL}}" class="ui text-label red mini label">{{svg "octicon-issue-closed" 16}} {{$.i18n.Tr "repo.issues.closed_title"}}</a>
<a href="{{.LatestPullRequest.Issue.HTMLURL}}" class="ui text-label red mini label">{{svg "octicon-git-pull-request" 16}} {{$.i18n.Tr "repo.issues.closed_title"}}</a>
{{else}}
<a href="{{.LatestPullRequest.Issue.HTMLURL}}" class="ui text-label green mini label">{{svg "octicon-issue-opened" 16}} {{$.i18n.Tr "repo.issues.open_title"}}</a>
<a href="{{.LatestPullRequest.Issue.HTMLURL}}" class="ui text-label green mini label">{{svg "octicon-git-pull-request" 16}} {{$.i18n.Tr "repo.issues.open_title"}}</a>
{{end}}
{{end}}
</td>

@ -19,7 +19,7 @@
{{if .HasMerged}}
<div class="ui purple large label">{{svg "octicon-git-merge" 16}} {{.i18n.Tr "repo.pulls.merged"}}</div>
{{else if .Issue.IsClosed}}
<div class="ui red large label">{{svg "octicon-issue-closed" 16}} {{.i18n.Tr "repo.issues.closed_title"}}</div>
<div class="ui red large label">{{if .Issue.IsPull}}{{svg "octicon-git-pull-request" 16}}{{else}}{{svg "octicon-issue-closed" 16}}{{end}} {{.i18n.Tr "repo.issues.closed_title"}}</div>
{{else if .Issue.IsPull}}
<div class="ui green large label">{{svg "octicon-git-pull-request" 16}} {{.i18n.Tr "repo.issues.open_title"}}</div>
{{else}}

Loading…
Cancel
Save