-
+ {{$showDiffBox := false}}
+
{{if and $.PageIsComparePull $.IsSigned (not .Repository.IsArchived)}}
{{.locale.Tr "repo.pulls.compare_changes"}}
@@ -34,11 +34,6 @@
{{- if eq $.HeadRepo.OwnerName .RootRepo.OwnerName -}}
{{- $HeadCompareName = printf "%s/%s" $.HeadRepo.OwnerName $.HeadRepo.Name -}}
{{- end -}}
- {{- if .OwnForkRepo -}}
- {{- if eq $.OwnForkRepo.OwnerName .RootRepo.OwnerName -}}
- {{- $OwnForkRepoCompareName = printf "%s/%s" $.OwnForkRepo.OwnerName $.OwnForkRepo.Name -}}
- {{- end -}}
- {{- end -}}
{{- end -}}
{{else}}
{{if and $.IsSigned (not .Repository.IsArchived)}}
@@ -231,13 +227,20 @@
{{template "repo/issue/new_form" .}}
{{end}}
- {{template "repo/commits_table" .}}
- {{template "repo/diff/box" .}}
+ {{$showDiffBox = true}}
{{end}}
{{else}}
+ {{$showDiffBox = true}}
+ {{end}}
+
{{if and $.PageIsComparePull $.IsSigned (not .Repository.IsArchived)}}
{{.locale.Tr "repo.pulls.compare_changes"}}
@@ -34,11 +34,6 @@
{{- if eq $.HeadRepo.OwnerName .RootRepo.OwnerName -}}
{{- $HeadCompareName = printf "%s/%s" $.HeadRepo.OwnerName $.HeadRepo.Name -}}
{{- end -}}
- {{- if .OwnForkRepo -}}
- {{- if eq $.OwnForkRepo.OwnerName .RootRepo.OwnerName -}}
- {{- $OwnForkRepoCompareName = printf "%s/%s" $.OwnForkRepo.OwnerName $.OwnForkRepo.Name -}}
- {{- end -}}
- {{- end -}}
{{- end -}}
{{svg "octicon-git-compare"}}
@@ -203,14 +198,15 @@
#{{.PullRequest.Issue.Index}}
-
+
{{- if .PullRequest.HasMerged -}}
{{svg "octicon-git-merge" 16}} {{.locale.Tr "repo.pulls.view"}}
{{else if .Issue.IsClosed}}
{{svg "octicon-issue-closed" 16}} {{.locale.Tr "repo.pulls.view"}}
{{else}}
{{svg "octicon-git-pull-request" 16}} {{.locale.Tr "repo.pulls.view"}}
- {{end}}
+ {{end}}
+
{{- if .PullRequest.HasMerged -}}
{{svg "octicon-git-merge" 16}} {{.locale.Tr "repo.pulls.view"}}
{{else if .Issue.IsClosed}}
{{svg "octicon-issue-closed" 16}} {{.locale.Tr "repo.pulls.view"}}
{{else}}
{{svg "octicon-git-pull-request" 16}} {{.locale.Tr "repo.pulls.view"}}
- {{end}}
+ {{end}}
+