|
190 | 190 | {{end}} |
191 | 191 | </div> |
192 | 192 | </div> |
| 193 | + {{template "repo/issue/view_content/update_branch_by_merge" (dict "locale" .locale "Issue" .Issue "UpdateAllowed" .UpdateAllowed "UpdateByRebaseAllowed" .UpdateByRebaseAllowed "Link" .Link)}} |
193 | 194 | {{else if .Issue.PullRequest.IsChecking}} |
194 | 195 | <div class="item"> |
195 | 196 | <i class="icon icon-octicon">{{svg "octicon-sync"}}</i> |
|
282 | 283 | </div> |
283 | 284 | {{end}} |
284 | 285 | {{end}} |
285 | | - {{if and (gt .Issue.PullRequest.CommitsBehind 0) (not .Issue.IsClosed) (not .Issue.PullRequest.IsChecking) (not .IsPullFilesConflicted) (not .IsPullRequestBroken) (not $canAutoMerge)}} |
286 | | - <div class="ui divider"></div> |
287 | | - <div class="item item-section"> |
288 | | - <div class="item-section-left"> |
289 | | - <i class="icon icon-octicon">{{svg "octicon-alert"}}</i> |
290 | | - {{$.locale.Tr "repo.pulls.outdated_with_base_branch"}} |
291 | | - </div> |
292 | | - <div class="item-section-right"> |
293 | | - {{if and .UpdateAllowed .UpdateByRebaseAllowed}} |
294 | | - <div class="dib"> |
295 | | - <div class="ui buttons update-button"> |
296 | | - <button class="ui button" data-do="{{.Link}}/update" data-redirect="{{.Link}}"> |
297 | | - <span class="button-text"> |
298 | | - {{$.locale.Tr "repo.pulls.update_branch"}} |
299 | | - </span> |
300 | | - </button> |
301 | | - |
302 | | - <div class="ui dropdown icon button no-text"> |
303 | | - {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
304 | | - <div class="menu"> |
305 | | - <div class="item active selected" data-do="{{.Link}}/update">{{$.locale.Tr "repo.pulls.update_branch"}}</div> |
306 | | - <div class="item" data-do="{{.Link}}/update?style=rebase">{{$.locale.Tr "repo.pulls.update_branch_rebase"}}</div> |
307 | | - </div> |
308 | | - </div> |
309 | | - </div> |
310 | | - </div> |
311 | | - {{end}} |
312 | | - {{if and .UpdateAllowed (not .UpdateByRebaseAllowed)}} |
313 | | - <form action="{{.Link}}/update" method="post" class="ui update-branch-form"> |
314 | | - {{.CsrfTokenHtml}} |
315 | | - <button class="ui compact button" data-do="update"> |
316 | | - <span class="ui text">{{$.locale.Tr "repo.pulls.update_branch"}}</span> |
317 | | - </button> |
318 | | - </form> |
319 | | - {{end}} |
320 | | - </div> |
321 | | - </div> |
322 | | - {{end}} |
| 286 | + {{template "repo/issue/view_content/update_branch_by_merge" (dict "locale" .locale "Issue" .Issue "UpdateAllowed" .UpdateAllowed "UpdateByRebaseAllowed" .UpdateByRebaseAllowed "Link" .Link)}} |
323 | 287 | {{if .Issue.PullRequest.IsEmpty}} |
324 | 288 | <div class="ui divider"></div> |
325 | 289 |
|
|
0 commit comments