summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJames Lakin <jamesorlakin@users.noreply.github.com>2020-02-03 22:14:38 +0000
committerGitHub <noreply@github.com>2020-02-04 00:14:38 +0200
commit3ff95cef606fad166527b092cb063081e3b3b84e (patch)
treeda17ccedb0810d163de22ad41999977800f46293 /templates
parent20c513be6e376231a33f01625f5ae747d2051241 (diff)
downloadgitea-3ff95cef606fad166527b092cb063081e3b3b84e.tar.gz
gitea-3ff95cef606fad166527b092cb063081e3b3b84e.zip
Show if a PR has conflicting files on the PR lists (#10130)
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/list.tmpl11
-rw-r--r--templates/user/dashboard/issues.tmpl15
2 files changed, 18 insertions, 8 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index d280878f2e..16cee8619d 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -212,9 +212,9 @@
<div class="ui {{if .IsClosed}}{{if .IsPull}}{{if .PullRequest.HasMerged}}purple{{else}}red{{end}}{{else}}red{{end}}{{else}}{{if .IsRead}}white{{else}}green{{end}}{{end}} label">#{{.Index}}</div>
<a class="title has-emoji" href="{{$.Link}}/{{.Index}}">{{.Title}}</a>
- {{if .IsPull }}
- {{if (index $.CommitStatus .PullRequest.ID)}}
- {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}}
+ {{if .IsPull }}
+ {{if (index $.CommitStatus .PullRequest.ID)}}
+ {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}}
{{end}}
{{end}}
@@ -267,6 +267,11 @@
<img class="ui avatar image" src="{{.RelAvatarLink}}">
</a>
{{end}}
+ {{if .IsPull}}
+ {{if (len .PullRequest.ConflictedFiles) gt 0}}
+ <span class="conflicting"><i class="octicon octicon-mirror"></i> {{$.i18n.Tr "repo.pulls.num_conflicting_files" (len .PullRequest.ConflictedFiles)}}</span>
+ {{end}}
+ {{end}}
</p>
</li>
{{end}}
diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl
index 26020ca0ce..3a8d16f6cc 100644
--- a/templates/user/dashboard/issues.tmpl
+++ b/templates/user/dashboard/issues.tmpl
@@ -91,11 +91,11 @@
<div class="ui label">{{.Repo.FullName}}#{{.Index}}</div>
<a class="title has-emoji" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}/issues/{{.Index}}">{{.Title}}</a>
- {{if .IsPull }}
- {{if (index $.CommitStatus .PullRequest.ID)}}
- {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}}
- {{end}}
- {{end}}
+ {{if .IsPull}}
+ {{if (index $.CommitStatus .PullRequest.ID)}}
+ {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}}
+ {{end}}
+ {{end}}
{{with .Labels}}
{{/* If we have any labels, we should show them
@@ -151,6 +151,11 @@
<span class="octicon octicon-calendar"></span><span{{if .IsOverdue}} class="overdue"{{end}}>{{.DeadlineUnix.FormatShort}}</span>
</span>
{{end}}
+ {{if .IsPull}}
+ {{if (len .PullRequest.ConflictedFiles) gt 0}}
+ <span class="conflicting"><i class="octicon octicon-mirror"></i> {{$.i18n.Tr "repo.pulls.num_conflicting_files" (len .PullRequest.ConflictedFiles)}}</span>
+ {{end}}
+ {{end}}
</p>
</li>
{{end}}