|
204 | 204 | <div class="issue list">
|
205 | 205 | {{ $approvalCounts := .ApprovalCounts}}
|
206 | 206 | {{range .Issues}}
|
207 |
| - <li class="item"> |
208 |
| - {{if $.CanWriteIssuesOrPulls}} |
209 |
| - <div class="ui checkbox issue-checkbox"> |
210 |
| - <input type="checkbox" data-issue-id={{.ID}}></input> |
211 |
| - </div> |
212 |
| - {{end}} |
213 |
| - <div class="ui {{if .IsClosed}}{{if .IsPull}}{{if .PullRequest.HasMerged}}purple{{else}}red{{end}}{{else}}red{{end}}{{else}}{{if .IsRead}}white{{else}}green{{end}}{{end}} label">#{{.Index}}</div> |
214 |
| - <a class="title" href="{{$.Link}}/{{.Index}}">{{RenderEmoji .Title}}</a> |
215 |
| - |
216 |
| - {{if .IsPull }} |
217 |
| - {{if (index $.CommitStatus .PullRequest.ID)}} |
218 |
| - {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}} |
219 |
| - {{end}} |
220 |
| - {{end}} |
221 |
| - |
222 |
| - {{range .Labels}} |
223 |
| - <a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a> |
224 |
| - {{end}} |
225 |
| - |
226 |
| - {{if .NumComments}} |
227 |
| - <span class="comment ui right">{{svg "octicon-comment"}} {{.NumComments}}</span> |
228 |
| - {{end}} |
229 |
| - |
230 |
| - {{if .TotalTrackedTime}} |
231 |
| - <span class="comment ui right">{{svg "octicon-clock"}} {{.TotalTrackedTime | Sec2Time}}</span> |
232 |
| - {{end}} |
233 |
| - |
234 |
| - <p class="desc"> |
235 |
| - {{ $timeStr := TimeSinceUnix .GetLastEventTimestamp $.Lang }} |
236 |
| - {{if .OriginalAuthor }} |
237 |
| - {{$.i18n.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor | Safe}} |
238 |
| - {{else if gt .Poster.ID 0}} |
239 |
| - {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink (.Poster.GetDisplayName | Escape) | Safe}} |
240 |
| - {{else}} |
241 |
| - {{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}} |
242 |
| - {{end}} |
243 |
| - |
244 |
| - {{if .Milestone}} |
245 |
| - <a class="milestone" href="{{$.RepoLink}}/milestone/{{.Milestone.ID}}"> |
246 |
| - {{svg "octicon-milestone"}} {{.Milestone.Name}} |
247 |
| - </a> |
248 |
| - {{end}} |
249 |
| - {{if .Ref}} |
250 |
| - <a class="ref" href="{{index $.IssueRefURLs .ID}}"> |
251 |
| - {{svg "octicon-git-branch"}} {{index $.IssueRefEndNames .ID}} |
252 |
| - </a> |
253 |
| - {{end}} |
254 |
| - {{$tasks := .GetTasks}} |
255 |
| - {{if gt $tasks 0}} |
256 |
| - {{$tasksDone := .GetTasksDone}} |
257 |
| - <span class="checklist"> |
258 |
| - {{svg "octicon-checklist"}} {{$tasksDone}} / {{$tasks}} <span class="progress-bar"><span class="progress" style="width:calc(100% * {{$tasksDone}} / {{$tasks}});"></span></span> |
259 |
| - </span> |
| 207 | + <li class="item df py-3"> |
| 208 | + <div class="issue-item-left df py-2"> |
| 209 | + {{if $.CanWriteIssuesOrPulls}} |
| 210 | + <div class="ui checkbox issue-checkbox"> |
| 211 | + <input type="checkbox" data-issue-id={{.ID}}></input> |
| 212 | + <label></label> |
| 213 | + </div> |
260 | 214 | {{end}}
|
261 |
| - {{if ne .DeadlineUnix 0}} |
262 |
| - <span class="due-date poping up" data-content="{{$.i18n.Tr "repo.issues.due_date"}}" data-variation="tiny inverted" data-position="right center"> |
263 |
| - {{svg "octicon-calendar"}}<span{{if .IsOverdue}} class="overdue"{{end}}>{{.DeadlineUnix.FormatShort}}</span> |
| 215 | + <div class="issue-item-icon"> |
| 216 | + {{if .IsPull}} |
| 217 | + {{if .PullRequest.HasMerged}} |
| 218 | + {{svg "octicon-git-merge" 16 "text purple"}} |
| 219 | + {{else}} |
| 220 | + {{if .IsClosed}} |
| 221 | + {{svg "octicon-git-pull-request" 16 "text red"}} |
| 222 | + {{else}} |
| 223 | + {{svg "octicon-git-pull-request" 16 "text green"}} |
| 224 | + {{end}} |
| 225 | + {{end}} |
| 226 | + {{else}} |
| 227 | + {{if .IsClosed}} |
| 228 | + {{svg "octicon-issue-opened" 16 "text red"}} |
| 229 | + {{else}} |
| 230 | + {{svg "octicon-issue-closed" 16 "text green"}} |
| 231 | + {{end}} |
| 232 | + {{end}} |
| 233 | + </div> |
| 234 | + </div> |
| 235 | + <div class="issue-item-main f1 fc df"> |
| 236 | + <div class="issue-item-top-row df ac"> |
| 237 | + <a class="title my-1 mr-2" href="{{$.Link}}/{{.Index}}">{{RenderEmoji .Title}}</a> |
| 238 | + {{if .IsPull }} |
| 239 | + {{if (index $.CommitStatus .PullRequest.ID)}} |
| 240 | + {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}} |
| 241 | + {{end}} |
| 242 | + {{end}} |
| 243 | + {{range .Labels}} |
| 244 | + <a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a> |
| 245 | + {{end}} |
| 246 | + </div> |
| 247 | + <div class="desc issue-item-bottom-row df ac my-1"> |
| 248 | + <span class="index mr-2"> |
| 249 | + #{{.Index}} |
264 | 250 | </span>
|
265 |
| - {{end}} |
266 |
| - {{range .Assignees}} |
267 |
| - <a class="ui right assignee poping up" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-variation="inverted" data-position="left center"> |
268 |
| - <img class="ui avatar image" src="{{.RelAvatarLink}}"> |
269 |
| - </a> |
270 |
| - {{end}} |
271 |
| - {{if .IsPull}} |
272 |
| - {{$approveOfficial := call $approvalCounts .ID "approve"}} |
273 |
| - {{$rejectOfficial := call $approvalCounts .ID "reject"}} |
274 |
| - {{$waitingOfficial := call $approvalCounts .ID "waiting"}} |
275 |
| - {{if gt $approveOfficial 0}} |
276 |
| - <span class="approvals">{{svg "octicon-check"}} |
277 |
| - {{$.i18n.Tr (TrN $.i18n.Lang $approveOfficial "repo.pulls.approve_count_1" "repo.pulls.approve_count_n") $approveOfficial}} |
278 |
| - </span> |
| 251 | + {{ $timeStr := TimeSinceUnix .GetLastEventTimestamp $.Lang }} |
| 252 | + {{if .OriginalAuthor }} |
| 253 | + {{$.i18n.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor | Safe}} |
| 254 | + {{else if gt .Poster.ID 0}} |
| 255 | + {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink (.Poster.GetDisplayName | Escape) | Safe}} |
| 256 | + {{else}} |
| 257 | + {{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}} |
279 | 258 | {{end}}
|
280 | 259 |
|
281 |
| - {{if gt $rejectOfficial 0}} |
282 |
| - <span class="rejects">{{svg "octicon-diff"}} |
283 |
| - {{$.i18n.Tr (TrN $.i18n.Lang $rejectOfficial "repo.pulls.reject_count_1" "repo.pulls.reject_count_n") $rejectOfficial}} |
| 260 | + {{if .Milestone}} |
| 261 | + <a class="milestone" href="{{$.RepoLink}}/milestone/{{.Milestone.ID}}"> |
| 262 | + {{svg "octicon-milestone"}} {{.Milestone.Name}} |
| 263 | + </a> |
| 264 | + {{end}} |
| 265 | + {{if .Ref}} |
| 266 | + <a class="ref" href="{{index $.IssueRefURLs .ID}}"> |
| 267 | + {{svg "octicon-git-branch"}} {{index $.IssueRefEndNames .ID}} |
| 268 | + </a> |
| 269 | + {{end}} |
| 270 | + {{$tasks := .GetTasks}} |
| 271 | + {{if gt $tasks 0}} |
| 272 | + {{$tasksDone := .GetTasksDone}} |
| 273 | + <span class="checklist"> |
| 274 | + {{svg "octicon-checklist"}} {{$tasksDone}} / {{$tasks}} <span class="progress-bar"><span class="progress" style="width:calc(100% * {{$tasksDone}} / {{$tasks}});"></span></span> |
284 | 275 | </span>
|
285 | 276 | {{end}}
|
286 |
| - |
287 |
| - {{if gt $waitingOfficial 0}} |
288 |
| - <span class="waiting">{{svg "octicon-eye"}} |
289 |
| - {{$.i18n.Tr (TrN $.i18n.Lang $waitingOfficial "repo.pulls.waiting_count_1" "repo.pulls.waiting_count_n") $waitingOfficial}} |
| 277 | + {{if ne .DeadlineUnix 0}} |
| 278 | + <span class="due-date poping up" data-content="{{$.i18n.Tr "repo.issues.due_date"}}" data-variation="tiny inverted" data-position="right center"> |
| 279 | + {{svg "octicon-calendar"}}<span{{if .IsOverdue}} class="overdue"{{end}}>{{.DeadlineUnix.FormatShort}}</span> |
290 | 280 | </span>
|
291 | 281 | {{end}}
|
| 282 | + {{if .IsPull}} |
| 283 | + {{$approveOfficial := call $approvalCounts .ID "approve"}} |
| 284 | + {{$rejectOfficial := call $approvalCounts .ID "reject"}} |
| 285 | + {{$waitingOfficial := call $approvalCounts .ID "waiting"}} |
| 286 | + {{if gt $approveOfficial 0}} |
| 287 | + <span class="approvals">{{svg "octicon-check"}} |
| 288 | + {{$.i18n.Tr (TrN $.i18n.Lang $approveOfficial "repo.pulls.approve_count_1" "repo.pulls.approve_count_n") $approveOfficial}} |
| 289 | + </span> |
| 290 | + {{end}} |
| 291 | + |
| 292 | + {{if gt $rejectOfficial 0}} |
| 293 | + <span class="rejects">{{svg "octicon-diff"}} |
| 294 | + {{$.i18n.Tr (TrN $.i18n.Lang $rejectOfficial "repo.pulls.reject_count_1" "repo.pulls.reject_count_n") $rejectOfficial}} |
| 295 | + </span> |
| 296 | + {{end}} |
| 297 | + |
| 298 | + {{if gt $waitingOfficial 0}} |
| 299 | + <span class="waiting">{{svg "octicon-eye"}} |
| 300 | + {{$.i18n.Tr (TrN $.i18n.Lang $waitingOfficial "repo.pulls.waiting_count_1" "repo.pulls.waiting_count_n") $waitingOfficial}} |
| 301 | + </span> |
| 302 | + {{end}} |
292 | 303 |
|
293 |
| - {{if and (not .PullRequest.HasMerged) (gt (len .PullRequest.ConflictedFiles) 0)}} |
294 |
| - <span class="conflicting">{{svg "octicon-x"}} {{$.i18n.Tr (TrN $.i18n.Lang (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n") (len .PullRequest.ConflictedFiles)}}</span> |
| 304 | + {{if and (not .PullRequest.HasMerged) (gt (len .PullRequest.ConflictedFiles) 0)}} |
| 305 | + <span class="conflicting">{{svg "octicon-x"}} {{$.i18n.Tr (TrN $.i18n.Lang (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n") (len .PullRequest.ConflictedFiles)}}</span> |
| 306 | + {{end}} |
295 | 307 | {{end}}
|
296 |
| - {{end}} |
297 |
| - </p> |
| 308 | + </div> |
| 309 | + </div> |
| 310 | + <div class="issue-item-icons-right df p-2"> |
| 311 | + <div class="issue-item-icon-right text grey"> |
| 312 | + {{if .TotalTrackedTime}} |
| 313 | + {{svg "octicon-clock" 16 "mr-2"}}{{.TotalTrackedTime | Sec2Time}} |
| 314 | + {{end}} |
| 315 | + </div> |
| 316 | + <div class="issue-item-icon-right text grey"> |
| 317 | + {{range .Assignees}} |
| 318 | + <a class="ui assignee poping up" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-variation="inverted" data-position="left center"> |
| 319 | + <img class="ui avatar image" src="{{.RelAvatarLink}}"> |
| 320 | + </a> |
| 321 | + {{end}} |
| 322 | + </div> |
| 323 | + <div class="issue-item-icon-right text grey"> |
| 324 | + {{if .NumComments}} |
| 325 | + {{svg "octicon-comment" 16 "mr-2"}}{{.NumComments}} |
| 326 | + {{end}} |
| 327 | + </div> |
| 328 | + </div> |
298 | 329 | </li>
|
299 | 330 | {{end}}
|
300 | 331 |
|
|
0 commit comments