|
1 |
| -{{$canAutoMerge := false}} |
2 |
| -{{if and (gt .Issue.PullRequest.CommitsBehind 0) (not .Issue.IsClosed) (not .Issue.PullRequest.IsChecking) (not .IsPullFilesConflicted) (not .IsPullRequestBroken) (not $canAutoMerge)}} |
| 1 | +{{if and (gt $.Issue.PullRequest.CommitsBehind 0) (not $.Issue.IsClosed) (not $.Issue.PullRequest.IsChecking) (not $.IsPullFilesConflicted) (not $.IsPullRequestBroken)}} |
3 | 2 | <div class="ui divider"></div>
|
4 | 3 | <div class="item item-section">
|
5 | 4 | <div class="item-section-left">
|
6 | 5 | <i class="icon icon-octicon">{{svg "octicon-alert"}}</i>
|
7 | 6 | {{$.locale.Tr "repo.pulls.outdated_with_base_branch"}}
|
8 | 7 | </div>
|
9 | 8 | <div class="item-section-right">
|
10 |
| - {{if and .UpdateAllowed .UpdateByRebaseAllowed}} |
| 9 | + {{if and $.UpdateAllowed $.UpdateByRebaseAllowed}} |
11 | 10 | <div class="gt-dib">
|
12 | 11 | <div class="ui buttons update-button">
|
13 |
| - <button class="ui button" data-do="{{.Link}}/update" data-redirect="{{.Link}}"> |
| 12 | + <button class="ui button" data-do="{{$.Link}}/update" data-redirect="{{$.Link}}"> |
14 | 13 | <span class="button-text">
|
15 | 14 | {{$.locale.Tr "repo.pulls.update_branch"}}
|
16 | 15 | </span>
|
|
19 | 18 | <div class="ui dropdown icon button no-text">
|
20 | 19 | {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
21 | 20 | <div class="menu">
|
22 |
| - <a class="item active selected" data-do="{{.Link}}/update">{{$.locale.Tr "repo.pulls.update_branch"}}</a> |
23 |
| - <a class="item" data-do="{{.Link}}/update?style=rebase">{{$.locale.Tr "repo.pulls.update_branch_rebase"}}</a> |
| 21 | + <a class="item active selected" data-do="{{$.Link}}/update">{{$.locale.Tr "repo.pulls.update_branch"}}</a> |
| 22 | + <a class="item" data-do="{{$.Link}}/update?style=rebase">{{$.locale.Tr "repo.pulls.update_branch_rebase"}}</a> |
24 | 23 | </div>
|
25 | 24 | </div>
|
26 | 25 | </div>
|
27 | 26 | </div>
|
28 | 27 | {{end}}
|
29 |
| - {{if and .UpdateAllowed (not .UpdateByRebaseAllowed)}} |
30 |
| - <form action="{{.Link}}/update" method="post" class="ui update-branch-form"> |
31 |
| - {{.CsrfTokenHtml}} |
32 |
| - <button class="ui compact button" data-do="update"> |
| 28 | + {{if and $.UpdateAllowed (not $.UpdateByRebaseAllowed)}} |
| 29 | + <form action="{{$.Link}}/update" method="post" class="ui update-branch-form"> |
| 30 | + {{$.CsrfTokenHtml}} |
| 31 | + <button class="ui compact button"> |
33 | 32 | <span class="ui text">{{$.locale.Tr "repo.pulls.update_branch"}}</span>
|
34 | 33 | </button>
|
35 | 34 | </form>
|
|
0 commit comments