|
22 | 22 | <div class="content">
|
23 | 23 | {{template "repo/pulls/status" .}}
|
24 | 24 | {{$showGeneralMergeForm := false}}
|
25 |
| - <div class="ui attached merge-section segment {{if not $.LatestCommitStatus}}no-header{{end}}"> |
| 25 | + <div class="ui attached merge-section segment {{if not $.LatestCommitStatus}}no-header{{end}} flex-items-block"> |
26 | 26 | {{if .Issue.PullRequest.HasMerged}}
|
27 | 27 | {{if .IsPullBranchDeletable}}
|
28 | 28 | <div class="item item-section text gt-f1">
|
29 | 29 | <div class="item-section-left">
|
30 | 30 | <h3 class="gt-mb-3">
|
31 |
| - {{$.locale.Tr "repo.pulls.merged_success"}} |
| 31 | + {{$.locale.Tr "repo.pulls.merged_success"}} |
32 | 32 | </h3>
|
33 | 33 | <div class="merge-section-info">
|
34 | 34 | {{$.locale.Tr "repo.pulls.merged_info_text" (printf "<code>%s</code>" (.HeadTarget | Escape)) | Str2html}}
|
|
58 | 58 | {{end}}
|
59 | 59 | </div>
|
60 | 60 | {{else if .IsPullFilesConflicted}}
|
61 |
| - <div class="item text"> |
| 61 | + <div class="item"> |
62 | 62 | {{svg "octicon-x"}}
|
63 | 63 | {{$.locale.Tr "repo.pulls.files_conflicted"}}
|
64 |
| - <ul> |
65 |
| - {{range .ConflictedFiles}} |
66 |
| - <li>{{.}}</li> |
67 |
| - {{end}} |
68 |
| - </ul> |
69 | 64 | </div>
|
| 65 | + <ul> |
| 66 | + {{range .ConflictedFiles}} |
| 67 | + <li>{{.}}</li> |
| 68 | + {{end}} |
| 69 | + </ul> |
70 | 70 | {{else if .IsPullRequestBroken}}
|
71 | 71 | <div class="item">
|
72 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
| 72 | + {{svg "octicon-x"}} |
73 | 73 | {{$.locale.Tr "repo.pulls.data_broken"}}
|
74 | 74 | </div>
|
75 | 75 | {{else if .IsPullWorkInProgress}}
|
76 |
| - <div class="item toggle-wip gt-df gt-ac gt-sb" data-title="{{.Issue.Title}}" data-wip-prefix="{{(.WorkInProgressPrefix|Escape)}}" data-update-url="{{.Issue.Link}}/title"> |
77 |
| - <div> |
78 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
| 76 | + <div class="item toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{(.WorkInProgressPrefix|Escape)}}" data-update-url="{{.Issue.Link}}/title"> |
| 77 | + <div class="item-section-left flex-text-inline gt-f1"> |
| 78 | + {{svg "octicon-x"}} |
79 | 79 | {{$.locale.Tr "repo.pulls.cannot_merge_work_in_progress"}}
|
80 | 80 | </div>
|
81 |
| - <div> |
82 |
| - {{if or .HasIssuesOrPullsWritePermission .IsIssuePoster}} |
83 |
| - <button class="ui compact button"> |
84 |
| - {{$.locale.Tr "repo.pulls.remove_prefix" (.WorkInProgressPrefix|Escape) | Safe}} |
85 |
| - </button> |
86 |
| - {{end}} |
87 |
| - </div> |
| 81 | + {{if or .HasIssuesOrPullsWritePermission .IsIssuePoster}} |
| 82 | + <button class="ui compact button"> |
| 83 | + {{$.locale.Tr "repo.pulls.remove_prefix" (.WorkInProgressPrefix|Escape) | Safe}} |
| 84 | + </button> |
| 85 | + {{end}} |
88 | 86 | </div>
|
89 | 87 | {{template "repo/issue/view_content/update_branch_by_merge" $}}
|
90 | 88 | {{else if .Issue.PullRequest.IsChecking}}
|
91 | 89 | <div class="item">
|
92 |
| - <i class="icon icon-octicon">{{svg "octicon-sync"}}</i> |
| 90 | + {{svg "octicon-sync"}} |
93 | 91 | {{$.locale.Tr "repo.pulls.is_checking"}}
|
94 | 92 | </div>
|
95 | 93 | {{else if .Issue.PullRequest.IsAncestor}}
|
96 | 94 | <div class="item">
|
97 |
| - <i class="icon icon-octicon">{{svg "octicon-alert"}}</i> |
| 95 | + {{svg "octicon-alert"}} |
98 | 96 | {{$.locale.Tr "repo.pulls.is_ancestor"}}
|
99 | 97 | </div>
|
100 | 98 | {{else if or .Issue.PullRequest.CanAutoMerge .Issue.PullRequest.IsEmpty}}
|
101 | 99 | {{if .IsBlockedByApprovals}}
|
102 | 100 | <div class="item">
|
103 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
104 |
| - {{$.locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}} |
| 101 | + {{svg "octicon-x"}} |
| 102 | + {{$.locale.Tr "repo.pulls.blocked_by_approvals" .GrantedApprovals .ProtectedBranch.RequiredApprovals}} |
105 | 103 | </div>
|
106 | 104 | {{else if .IsBlockedByRejection}}
|
107 | 105 | <div class="item">
|
108 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
| 106 | + {{svg "octicon-x"}} |
109 | 107 | {{$.locale.Tr "repo.pulls.blocked_by_rejection"}}
|
110 | 108 | </div>
|
111 | 109 | {{else if .IsBlockedByOfficialReviewRequests}}
|
112 | 110 | <div class="item">
|
113 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
| 111 | + {{svg "octicon-x"}} |
114 | 112 | {{$.locale.Tr "repo.pulls.blocked_by_official_review_requests"}}
|
115 | 113 | </div>
|
116 | 114 | {{else if .IsBlockedByOutdatedBranch}}
|
117 | 115 | <div class="item">
|
118 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
119 |
| - {{$.locale.Tr "repo.pulls.blocked_by_outdated_branch"}} |
| 116 | + {{svg "octicon-x"}} |
| 117 | + {{$.locale.Tr "repo.pulls.blocked_by_outdated_branch"}} |
120 | 118 | </div>
|
121 | 119 | {{else if .IsBlockedByChangedProtectedFiles}}
|
122 | 120 | <div class="item">
|
123 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
| 121 | + {{svg "octicon-x"}} |
124 | 122 | {{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
|
125 |
| - <ul> |
126 |
| - {{range .ChangedProtectedFiles}} |
127 |
| - <li>{{.}}</li> |
128 |
| - {{end}} |
129 |
| - </ul> |
130 | 123 | </div>
|
| 124 | + <ul> |
| 125 | + {{range .ChangedProtectedFiles}} |
| 126 | + <li>{{.}}</li> |
| 127 | + {{end}} |
| 128 | + </ul> |
131 | 129 | {{else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsError .RequiredStatusCheckState.IsFailure)}}
|
132 | 130 | <div class="item">
|
133 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
| 131 | + {{svg "octicon-x"}} |
134 | 132 | {{$.locale.Tr "repo.pulls.required_status_check_failed"}}
|
135 | 133 | </div>
|
136 | 134 | {{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
|
137 | 135 | <div class="item">
|
138 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
| 136 | + {{svg "octicon-x"}} |
139 | 137 | {{$.locale.Tr "repo.pulls.required_status_check_missing"}}
|
140 | 138 | </div>
|
141 | 139 | {{else if and .AllowMerge .RequireSigned (not .WillSign)}}
|
142 | 140 | <div class="item">
|
143 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
| 141 | + {{svg "octicon-x"}} |
144 | 142 | {{$.locale.Tr "repo.pulls.require_signed_wont_sign"}}
|
145 | 143 | </div>
|
146 | 144 | <div class="item">
|
147 |
| - <i class="icon icon-octicon">{{svg "octicon-unlock"}}</i> |
| 145 | + {{svg "octicon-unlock"}} |
148 | 146 | {{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
|
149 | 147 | </div>
|
150 | 148 | {{end}}
|
|
158 | 156 | {{if $canMergeNow}}
|
159 | 157 | {{if $notAllOverridableChecksOk}}
|
160 | 158 | <div class="item">
|
161 |
| - <i class="icon icon-octicon">{{svg "octicon-dot-fill"}}</i> |
| 159 | + {{svg "octicon-dot-fill"}} |
162 | 160 | {{$.locale.Tr "repo.pulls.required_status_check_administrator"}}
|
163 | 161 | </div>
|
164 | 162 | {{else}}
|
165 | 163 | <div class="item">
|
166 |
| - <i class="icon icon-octicon">{{svg "octicon-check"}}</i> |
| 164 | + {{svg "octicon-check"}} |
167 | 165 | {{$.locale.Tr "repo.pulls.can_auto_merge_desc"}}
|
168 | 166 | </div>
|
169 | 167 | {{end}}
|
170 | 168 | {{if .WillSign}}
|
171 | 169 | <div class="item">
|
172 |
| - <i class="icon icon-octicon">{{svg "octicon-lock" 16 "text green"}}</i> |
| 170 | + {{svg "octicon-lock" 16 "text green"}} |
173 | 171 | {{$.locale.Tr "repo.signing.will_sign" .SigningKey}}
|
174 | 172 | </div>
|
175 | 173 | {{else if .IsSigned}}
|
176 | 174 | <div class="item">
|
177 |
| - <i class="icon icon-octicon">{{svg "octicon-unlock"}}</i> |
| 175 | + {{svg "octicon-unlock"}} |
178 | 176 | {{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
|
179 | 177 | </div>
|
180 | 178 | {{end}}
|
|
184 | 182 | <div class="ui divider"></div>
|
185 | 183 |
|
186 | 184 | <div class="item">
|
187 |
| - <i class="icon icon-octicon">{{svg "octicon-alert"}}</i> |
| 185 | + {{svg "octicon-alert"}} |
188 | 186 | {{$.locale.Tr "repo.pulls.is_empty"}}
|
189 | 187 | </div>
|
190 | 188 | {{end}}
|
|
315 | 313 | </div>
|
316 | 314 | {{else if .IsBlockedByOutdatedBranch}}
|
317 | 315 | <div class="item text red">
|
318 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
319 |
| - {{$.locale.Tr "repo.pulls.blocked_by_outdated_branch"}} |
| 316 | + {{svg "octicon-x"}} |
| 317 | + {{$.locale.Tr "repo.pulls.blocked_by_outdated_branch"}} |
320 | 318 | </div>
|
321 | 319 | {{else if .IsBlockedByChangedProtectedFiles}}
|
322 | 320 | <div class="item text red">
|
323 |
| - <i class="icon icon-octicon">{{svg "octicon-x"}}</i> |
| 321 | + {{svg "octicon-x"}} |
324 | 322 | {{$.locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
|
325 |
| - <ul> |
326 |
| - {{range .ChangedProtectedFiles}} |
327 |
| - <li>{{.}}</li> |
328 |
| - {{end}} |
329 |
| - </ul> |
330 | 323 | </div>
|
| 324 | + <ul> |
| 325 | + {{range .ChangedProtectedFiles}} |
| 326 | + <li>{{.}}</li> |
| 327 | + {{end}} |
| 328 | + </ul> |
331 | 329 | {{else if and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess)}}
|
332 | 330 | <div class="item text red">
|
333 | 331 | {{svg "octicon-x"}}
|
|
0 commit comments