gitea

Development moved to Codeberg

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
  83. 83
  84. 84
  85. 85
  86. 86
  87. 87
  88. 88
  89. 89
  90. 90
  91. 91
  92. 92
  93. 93
  94. 94
  95. 95
  96. 96
  97. 97
  98. 98
  99. 99
  100. 100
  101. 101
  102. 102
  103. 103
  104. 104
  105. 105
  106. 106
  107. 107
  108. 108
  109. 109
  110. 110
  111. 111
  112. 112
  113. 113
  114. 114
  115. 115
  116. 116
  117. 117
  118. 118
  119. 119
  120. 120
  121. 121
  122. 122
  123. 123
  124. 124
  125. 125
  126. 126
  127. 127
  128. 128
  129. 129
  130. 130
  131. 131
  132. 132
  133. 133
  134. 134
  135. 135
  136. 136
  137. 137
  138. 138
  139. 139
  140. 140
  141. 141
  142. 142
  143. 143
  144. 144
  145. 145
  146. 146
  147. 147
  148. 148
<div class="issue list">
	{{ $approvalCounts := .ApprovalCounts}}
	{{range .Issues}}
		<li class="item df py-3">
			<div class="issue-item-left df">
				{{if $.CanWriteIssuesOrPulls}}
					<div class="ui checkbox issue-checkbox">
						<input type="checkbox" data-issue-id={{.ID}}></input>
						<label></label>
					</div>
				{{end}}
				<div class="issue-item-icon">
					{{if .IsPull}}
						{{if .PullRequest.HasMerged}}
							{{svg "octicon-git-merge" 16 "text purple"}}
						{{else}}
							{{if .IsClosed}}
								{{svg "octicon-git-pull-request" 16 "text red"}}
							{{else}}
								{{svg "octicon-git-pull-request" 16 "text green"}}
							{{end}}
						{{end}}
					{{else}}
						{{if .IsClosed}}
							{{svg "octicon-issue-closed" 16 "text red"}}
						{{else}}
							{{svg "octicon-issue-opened" 16 "text green"}}
						{{end}}
					{{end}}
				</div>
			</div>
			<div class="issue-item-main f1 fc df">
				<div class="issue-item-top-row">
					<a class="title tdn" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji .Title}}</a>
					{{if .IsPull}}
						{{if (index $.CommitStatus .PullRequest.ID)}}
							{{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}}
						{{end}}
					{{end}}
					<span class="labels-list ml-2">
						{{range .Labels}}
							<a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}{{if ne $.listType "milestone"}}&milestone={{$.MilestoneID}}{{end}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a>
						{{end}}
					</span>
				</div>
				<div class="desc issue-item-bottom-row df ac fw my-1">
					<a class="index ml-0 mr-2" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
						{{if eq $.listType "dashboard"}}
							{{.Repo.FullName}}#{{.Index}}
						{{else}}
							#{{.Index}}
						{{end}}
					</a>
					{{ $timeStr := TimeSinceUnix .GetLastEventTimestamp $.i18n.Lang }}
					{{if .OriginalAuthor }}
						{{$.i18n.Tr .GetLastEventLabelFake $timeStr (.OriginalAuthor|Escape) | Safe}}
					{{else if gt .Poster.ID 0}}
						{{$.i18n.Tr .GetLastEventLabel $timeStr (.Poster.HomeLink|Escape) (.Poster.GetDisplayName | Escape) | Safe}}
					{{else}}
						{{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}}
					{{end}}
					{{if and .Milestone (ne $.listType "milestone")}}
						<a class="milestone" {{if $.RepoLink}}href="{{$.RepoLink}}/milestone/{{.Milestone.ID}}"{{else}}href="{{.Repo.Link}}/milestone/{{.Milestone.ID}}"{{end}}>
							{{svg "octicon-milestone" 14 "mr-2"}}{{.Milestone.Name}}
						</a>
					{{end}}
					{{if .Ref}}
						<a class="ref" {{if $.RepoLink}}href="{{index $.IssueRefURLs .ID}}"{{else}}href="{{.Repo.Link}}{{index $.IssueRefURLs .ID}}"{{end}}>
							{{svg "octicon-git-branch" 14 "mr-2"}}{{index $.IssueRefEndNames .ID}}
						</a>
					{{end}}
					{{$tasks := .GetTasks}}
					{{if gt $tasks 0}}
						{{$tasksDone := .GetTasksDone}}
						<span class="checklist">
							{{svg "octicon-checklist" 14 "mr-2"}}{{$tasksDone}} / {{$tasks}} <span class="progress-bar"><span class="progress" style="width:calc(100% * {{$tasksDone}} / {{$tasks}});"></span></span>
						</span>
					{{end}}
					{{if ne .DeadlineUnix 0}}
						<span class="due-date tooltip" data-content="{{$.i18n.Tr "repo.issues.due_date"}}" data-position="right center">
							<span{{if .IsOverdue}} class="overdue"{{end}}>
								{{svg "octicon-calendar" 14 "mr-2"}}
								{{.DeadlineUnix.FormatShort}}
							</span>
						</span>
					{{end}}
					{{if .IsPull}}
						{{$approveOfficial := call $approvalCounts .ID "approve"}}
						{{$rejectOfficial := call $approvalCounts .ID "reject"}}
						{{$waitingOfficial := call $approvalCounts .ID "waiting"}}
						{{if gt $approveOfficial 0}}
							<span class="approvals df ac">
								{{svg "octicon-check" 14 "mr-1"}}
								{{$.i18n.TrN $approveOfficial "repo.pulls.approve_count_1" "repo.pulls.approve_count_n" $approveOfficial}}
							</span>
						{{end}}
						{{if gt $rejectOfficial 0}}
							<span class="rejects df ac">
								{{svg "octicon-diff" 14 "mr-2"}}
								{{$.i18n.TrN $rejectOfficial "repo.pulls.reject_count_1" "repo.pulls.reject_count_n" $rejectOfficial}}
							</span>
						{{end}}
						{{if gt $waitingOfficial 0}}
							<span class="waiting df ac">
								{{svg "octicon-eye" 14 "mr-2"}}
								{{$.i18n.TrN $waitingOfficial "repo.pulls.waiting_count_1" "repo.pulls.waiting_count_n" $waitingOfficial}}
							</span>
						{{end}}
						{{if and (not .PullRequest.HasMerged) (gt (len .PullRequest.ConflictedFiles) 0)}}
							<span class="conflicting df ac">
								{{svg "octicon-x" 14}}
								{{$.i18n.TrN (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n" (len .PullRequest.ConflictedFiles)}}
							</span>
						{{end}}
					{{end}}
				</div>
			</div>
			<div class="issue-item-icons-right df p-2">
				<div class="issue-item-icon-right text grey">
					{{if .TotalTrackedTime}}
						{{svg "octicon-clock" 16 "mr-2"}}
						{{.TotalTrackedTime | Sec2Time}}
					{{end}}
				</div>
				<div class="issue-item-icon-right text grey">
					{{range .Assignees}}
						<a class="ui assignee tooltip tdn" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-position="left center">
							{{avatar .}}
						</a>
					{{end}}
				</div>
				<div class="issue-item-icon-right text grey">
					{{if .NumComments}}
						<a class="tdn" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
							{{svg "octicon-comment" 16 "mr-2"}}{{.NumComments}}
						</a>
					{{end}}
				</div>
			</div>
		</li>
	{{end}}
	{{if .IssueIndexerUnavailable}}
		<div class="ui error message">
			<p>{{$.i18n.Tr "repo.issues.keyword_search_unavailable"}}</p>
		</div>
	{{end}}
</div>
{{template "base/paginate" .}}