|
1 | 1 | {{template "base/head" .}}
|
2 | 2 | <div role="main" aria-label="{{.Title}}" class="page-content repository diff {{if .PageIsComparePull}}compare pull{{end}}">
|
3 | 3 | {{template "repo/header" .}}
|
4 |
| - <div class="ui container fluid padded"> |
5 |
| - |
| 4 | + {{$showDiffBox := false}} |
| 5 | + <div class="ui container"> |
6 | 6 | <h2 class="ui header">
|
7 | 7 | {{if and $.PageIsComparePull $.IsSigned (not .Repository.IsArchived)}}
|
8 | 8 | {{.locale.Tr "repo.pulls.compare_changes"}}
|
|
34 | 34 | {{- if eq $.HeadRepo.OwnerName .RootRepo.OwnerName -}}
|
35 | 35 | {{- $HeadCompareName = printf "%s/%s" $.HeadRepo.OwnerName $.HeadRepo.Name -}}
|
36 | 36 | {{- end -}}
|
37 |
| - {{- if .OwnForkRepo -}} |
38 |
| - {{- if eq $.OwnForkRepo.OwnerName .RootRepo.OwnerName -}} |
39 |
| - {{- $OwnForkRepoCompareName = printf "%s/%s" $.OwnForkRepo.OwnerName $.OwnForkRepo.Name -}} |
40 |
| - {{- end -}} |
41 |
| - {{- end -}} |
42 | 37 | {{- end -}}
|
43 | 38 | <div class="ui segment choose branch">
|
44 | 39 | <a href="{{$.HeadRepo.Link}}/compare/{{PathEscapeSegments $.HeadBranch}}{{$.CompareSeparator}}{{if not $.PullRequestCtx.SameRepo}}{{PathEscape $.BaseName}}/{{PathEscape $.Repository.Name}}:{{end}}{{PathEscapeSegments $.BaseBranch}}" title="{{.locale.Tr "repo.pulls.switch_head_and_base"}}">{{svg "octicon-git-compare"}}</a>
|
|
203 | 198 | <span class="index">#{{.PullRequest.Issue.Index}}</span>
|
204 | 199 | </h1>
|
205 | 200 | </div>
|
206 |
| - <div class="four wide right middle aligned column"> |
| 201 | + <div class="four wide column middle aligned text right"> |
207 | 202 | {{- if .PullRequest.HasMerged -}}
|
208 | 203 | <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button purple show-form">{{svg "octicon-git-merge" 16}} {{.locale.Tr "repo.pulls.view"}}</a>
|
209 | 204 | {{else if .Issue.IsClosed}}
|
210 | 205 | <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button red show-form">{{svg "octicon-issue-closed" 16}} {{.locale.Tr "repo.pulls.view"}}</a>
|
211 | 206 | {{else}}
|
212 | 207 | <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button green show-form">{{svg "octicon-git-pull-request" 16}} {{.locale.Tr "repo.pulls.view"}}</a>
|
213 |
| - {{end}}</div> |
| 208 | + {{end}} |
| 209 | + </div> |
214 | 210 | </div>
|
215 | 211 | {{else}}
|
216 | 212 | {{if and $.IsSigned (not .Repository.IsArchived)}}
|
|
231 | 227 | {{template "repo/issue/new_form" .}}
|
232 | 228 | </div>
|
233 | 229 | {{end}}
|
234 |
| - {{template "repo/commits_table" .}} |
235 |
| - {{template "repo/diff/box" .}} |
| 230 | + {{$showDiffBox = true}} |
236 | 231 | {{end}}
|
237 | 232 | {{else}}
|
| 233 | + {{$showDiffBox = true}} |
| 234 | + {{end}} |
| 235 | + </div> |
| 236 | + |
| 237 | + {{if $showDiffBox}} |
| 238 | + <div class="ui container"> |
238 | 239 | {{template "repo/commits_table" .}}
|
| 240 | + </div> |
| 241 | + <div class="ui container fluid padded"> |
239 | 242 | {{template "repo/diff/box" .}}
|
240 |
| - {{end}} |
241 | 243 | </div>
|
| 244 | + {{end}} |
242 | 245 | </div>
|
243 | 246 | {{template "base/footer" .}}
|
0 commit comments