diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 21ea63cc0a4..26b863aceae 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -1,6 +1,6 @@ {{if .DiffNotAvailable}} -
-
+
+
{{template "repo/diff/whitespace_dropdown" .}} {{template "repo/diff/options_dropdown" .}} diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl index 3ec08b00ac3..cb6dca441e5 100644 --- a/templates/repo/diff/compare.tmpl +++ b/templates/repo/diff/compare.tmpl @@ -1,8 +1,8 @@ {{template "base/head" .}}
{{template "repo/header" .}} -
- + {{$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 -}}
{{svg "octicon-git-compare"}} @@ -203,14 +198,15 @@ #{{.PullRequest.Issue.Index}}

-
{{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 $showDiffBox}} +
{{template "repo/commits_table" .}} +
+
{{template "repo/diff/box" .}} - {{end}}
+ {{end}}
{{template "base/footer" .}} diff --git a/templates/repo/pulls/files.tmpl b/templates/repo/pulls/files.tmpl index feec6eae743..402bec800b2 100644 --- a/templates/repo/pulls/files.tmpl +++ b/templates/repo/pulls/files.tmpl @@ -5,7 +5,7 @@
{{template "repo/header" .}} -
+
{{template "repo/issue/view_title" .}} {{template "repo/pulls/tab_menu" .}} {{template "repo/diff/box" .}}