diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-02-15 23:31:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 09:31:35 -0600 |
commit | 2c04595762b5c6ecfef8a32b05de7a5ef5f7066c (patch) | |
tree | fabea3f85ce0066f4c59dfa05127050bba760f32 /templates/repo/issue | |
parent | 4d306325c1ae826254abadffa286b8142fa251f8 (diff) | |
download | gitea-2c04595762b5c6ecfef8a32b05de7a5ef5f7066c.tar.gz gitea-2c04595762b5c6ecfef8a32b05de7a5ef5f7066c.zip |
Always show the `command line instructions` button even if there are conflicts (#22909)
Always show the `command line instructions` button even if there are
conflicts.
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/view_content/pull.tmpl | 28 | ||||
-rw-r--r-- | templates/repo/issue/view_content/pull_merge_instruction.tmpl | 6 |
2 files changed, 18 insertions, 16 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 663264171b..dff6b5daaa 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -167,9 +167,11 @@ <div class="item text"> {{svg "octicon-x"}} {{$.locale.Tr "repo.pulls.files_conflicted"}} - {{range .ConflictedFiles}} - <div>{{.}}</div> - {{end}} + <ul> + {{range .ConflictedFiles}} + <li>{{.}}</li> + {{end}} + </ul> </div> {{else if .IsPullRequestBroken}} <div class="item"> @@ -226,11 +228,11 @@ <div class="item"> <i class="icon icon-octicon">{{svg "octicon-x" 16}}</i> {{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}} - <div class="ui ordered list"> + <ul> {{range .ChangedProtectedFiles}} - <div data-value="-" class="item">{{.}}</div> + <li>{{.}}</li> {{end}} - </div> + </ul> </div> {{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}} <div class="item"> @@ -378,10 +380,6 @@ </script> <div id="pull-request-merge-form"></div> - - {{if .ShowMergeInstructions}} - {{template "repo/issue/view_content/pull_merge_instruction" (dict "locale" .locale "Issue" .Issue)}} - {{end}} {{else}} {{/* no merge style was set in repo setting: not or ($prUnit.PullRequestsConfig.AllowMerge ...) */}} <div class="ui divider"></div> @@ -428,11 +426,11 @@ <div class="item text red"> <i class="icon icon-octicon">{{svg "octicon-x" 16}}</i> {{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}} - <div class="ui ordered list"> + <ul> {{range .ChangedProtectedFiles}} - <div data-value="-" class="item">{{.}}</div> + <li>{{.}}</li> {{end}} - </div> + </ul> </div> {{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}} <div class="item text red"> @@ -479,6 +477,10 @@ </button> </div> {{end}} + + {{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo}} + {{template "repo/issue/view_content/pull_merge_instruction" (dict "locale" .locale "Issue" .Issue)}} + {{end}} </div> </div> </div> diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl index 5669b2fb69..39349d6ca4 100644 --- a/templates/repo/issue/view_content/pull_merge_instruction.tmpl +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -1,6 +1,6 @@ -<div class="instruct-toggle gt-mt-3"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div> -<div class="instruct-content" style="display:none"> - <div class="ui divider"></div> +<div class="ui divider"></div> +<div class="instruct-toggle"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div> +<div class="instruct-content gt-mt-3" style="display:none"> <div><h3 class="gt-di">{{$.locale.Tr "step1"}} </h3>{{$.locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div> <div class="ui secondary segment"> {{if eq $.Issue.PullRequest.Flow 0}} |