Skip to content

Commit 1e05adf

Browse files
authored
Delete duplicated update btn on pull request view page (#19993)
Fix #19987
1 parent 9068c78 commit 1e05adf

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed

templates/repo/issue/view_content/pull.tmpl

+1-39
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@
283283
{{end}}
284284
{{end}}
285285

286-
{{if (gt .Issue.PullRequest.CommitsBehind 0)}}
286+
{{if and (gt .Issue.PullRequest.CommitsBehind 0) (not .Issue.IsClosed) (not .Issue.PullRequest.IsChecking) (not .IsPullFilesConflicted) (not .IsPullRequestBroken) (not $canAutoMerge)}}
287287
<div class="ui divider"></div>
288288
<div class="item item-section">
289289
<div class="item-section-left">
@@ -481,44 +481,6 @@
481481
{{end}}
482482
{{end}}
483483

484-
{{if and (gt .Issue.PullRequest.CommitsBehind 0) (not .Issue.IsClosed) (not .Issue.PullRequest.IsChecking) (not .IsPullFilesConflicted) (not .IsPullRequestBroken) (not $canAutoMerge)}}
485-
<div class="item df ac sb">
486-
<div>
487-
<i class="icon icon-octicon">{{svg "octicon-alert"}}</i>
488-
{{$.i18n.Tr "repo.pulls.outdated_with_base_branch"}}
489-
</div>
490-
<div>
491-
{{if and .UpdateAllowed .UpdateByRebaseAllowed }}
492-
<div class="dib">
493-
<div class="ui buttons update-button">
494-
<button class="ui button" data-do="{{.Link}}/update" data-redirect="{{.Link}}">
495-
<span class="button-text">
496-
{{$.i18n.Tr "repo.pulls.update_branch"}}
497-
</span>
498-
</button>
499-
500-
<div class="ui dropdown icon button no-text">
501-
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
502-
<div class="menu">
503-
<div class="item active selected" data-do="{{.Link}}/update">{{$.i18n.Tr "repo.pulls.update_branch"}}</div>
504-
<div class="item" data-do="{{.Link}}/update?style=rebase">{{$.i18n.Tr "repo.pulls.update_branch_rebase"}}</div>
505-
</div>
506-
</div>
507-
</div>
508-
</div>
509-
{{end}}
510-
{{if and .UpdateAllowed (not .UpdateByRebaseAllowed)}}
511-
<form action="{{.Link}}/update" method="post">
512-
{{.CsrfTokenHtml}}
513-
<button class="ui compact button" data-do="update">
514-
<span class="ui text">{{$.i18n.Tr "repo.pulls.update_branch"}}</span>
515-
</button>
516-
</form>
517-
{{end}}
518-
</div>
519-
</div>
520-
{{end}}
521-
522484
{{if $.StillCanManualMerge}}
523485
<div class="ui divider"></div>
524486
<div class="ui form manually-merged-fields" style="display: none">

0 commit comments

Comments
 (0)