2023-03-30 13:00:49 -04:00
|
|
|
{{if and (gt $.Issue.PullRequest.CommitsBehind 0) (not $.Issue.IsClosed) (not $.Issue.PullRequest.IsChecking) (not $.IsPullFilesConflicted) (not $.IsPullRequestBroken)}}
|
2023-06-29 08:24:22 -04:00
|
|
|
<div class="divider"></div>
|
2023-02-03 01:24:45 -05:00
|
|
|
<div class="item item-section">
|
2023-06-14 12:40:15 -04:00
|
|
|
<div class="item-section-left flex-text-inline">
|
|
|
|
{{svg "octicon-alert"}}
|
2023-09-25 04:56:50 -04:00
|
|
|
{{ctx.Locale.Tr "repo.pulls.outdated_with_base_branch"}}
|
2023-02-03 01:24:45 -05:00
|
|
|
</div>
|
|
|
|
<div class="item-section-right">
|
2023-03-30 13:00:49 -04:00
|
|
|
{{if and $.UpdateAllowed $.UpdateByRebaseAllowed}}
|
2024-03-22 09:45:10 -04:00
|
|
|
<div class="tw-inline-block">
|
2023-02-03 01:24:45 -05:00
|
|
|
<div class="ui buttons update-button">
|
2023-03-30 13:00:49 -04:00
|
|
|
<button class="ui button" data-do="{{$.Link}}/update" data-redirect="{{$.Link}}">
|
2023-02-03 01:24:45 -05:00
|
|
|
<span class="button-text">
|
2023-09-25 04:56:50 -04:00
|
|
|
{{ctx.Locale.Tr "repo.pulls.update_branch"}}
|
2023-02-03 01:24:45 -05:00
|
|
|
</span>
|
|
|
|
</button>
|
2023-06-14 12:40:15 -04:00
|
|
|
<div class="ui dropdown icon button">
|
|
|
|
{{svg "octicon-triangle-down"}}
|
2023-02-03 01:24:45 -05:00
|
|
|
<div class="menu">
|
2023-09-25 04:56:50 -04:00
|
|
|
<a class="item active selected" data-do="{{$.Link}}/update">{{ctx.Locale.Tr "repo.pulls.update_branch"}}</a>
|
|
|
|
<a class="item" data-do="{{$.Link}}/update?style=rebase">{{ctx.Locale.Tr "repo.pulls.update_branch_rebase"}}</a>
|
2023-02-03 01:24:45 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2023-03-30 13:00:49 -04:00
|
|
|
{{if and $.UpdateAllowed (not $.UpdateByRebaseAllowed)}}
|
|
|
|
<form action="{{$.Link}}/update" method="post" class="ui update-branch-form">
|
|
|
|
{{$.CsrfTokenHtml}}
|
|
|
|
<button class="ui compact button">
|
2023-09-25 04:56:50 -04:00
|
|
|
<span class="ui text">{{ctx.Locale.Tr "repo.pulls.update_branch"}}</span>
|
2023-02-03 01:24:45 -05:00
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|