|
108 | 108 | </div>
|
109 | 109 | </div>
|
110 | 110 | {{end}}
|
| 111 | +{{if and .Issue.PullRequest.HasMerged (not .IsPullBranchDeletable)}} |
| 112 | +{{/* Then the merge box will not be displayed because this page already contains enough information */}} |
| 113 | +{{else}} |
111 | 114 | <div class="timeline-item comment merge box">
|
112 | 115 | <a class="timeline-avatar text {{if .Issue.PullRequest.HasMerged}}purple
|
113 | 116 | {{- else if .Issue.IsClosed}}grey
|
|
131 | 134 | {{$showGeneralMergeForm := false}}
|
132 | 135 | <div class="ui attached merge-section segment {{if not $.LatestCommitStatus}}no-header{{end}}">
|
133 | 136 | {{if .Issue.PullRequest.HasMerged}}
|
134 |
| - <div class="item item-section text gt-f1"> |
135 |
| - <div class="item-section-left"> |
136 |
| - <h3 class="gt-mb-3">{{$.locale.Tr "repo.pulls.merged_success"}}</h3> |
137 |
| - <div class="merge-section-info"> |
138 |
| - {{$.locale.Tr "repo.pulls.merged_info_text" (printf "<code>%s</code>" (.HeadTarget | Escape)) | Str2html}} |
| 137 | + {{if .IsPullBranchDeletable}} |
| 138 | + <div class="item item-section text gt-f1"> |
| 139 | + <div class="item-section-left"> |
| 140 | + <h3 class="gt-mb-3"> |
| 141 | + {{$.locale.Tr "repo.pulls.merged_success"}} |
| 142 | + </h3> |
| 143 | + <div class="merge-section-info"> |
| 144 | + {{$.locale.Tr "repo.pulls.merged_info_text" (printf "<code>%s</code>" (.HeadTarget | Escape)) | Str2html}} |
| 145 | + </div> |
139 | 146 | </div>
|
140 |
| - </div> |
141 |
| - {{if .IsPullBranchDeletable}} |
142 | 147 | <div class="item-section-right">
|
143 | 148 | <button class="delete-button ui button" data-url="{{.DeleteBranchLink}}">{{$.locale.Tr "repo.branch.delete_html"}}</button>
|
144 | 149 | </div>
|
145 |
| - {{end}} |
146 |
| - </div> |
| 150 | + </div> |
| 151 | + {{end}} |
147 | 152 | {{else if .Issue.IsClosed}}
|
148 | 153 | <div class="item item-section text gt-f1">
|
149 | 154 | <div class="item-section-left">
|
|
485 | 490 | </div>
|
486 | 491 | </div>
|
487 | 492 | </div>
|
| 493 | +{{end}} |
0 commit comments