|
178 | 178 | </div>
|
179 | 179 |
|
180 | 180 | <div class="issue list">
|
181 |
| - {{range .Issues}} |
182 |
| - {{ $timeStr:= TimeSinceUnix .CreatedUnix $.Lang }} |
| 181 | + {{range $index, $issue := .Issues}} |
| 182 | + {{ $timeStr:= TimeSinceUnix $issue.CreatedUnix $.Lang }} |
183 | 183 | <li class="item">
|
184 | 184 | <div class="ui checkbox issue-checkbox">
|
185 |
| - <input type="checkbox" data-issue-id={{.ID}}></input> |
| 185 | + <input type="checkbox" data-issue-id={{$issue.ID}}></input> |
186 | 186 | </div>
|
187 |
| - <div class="ui {{if .IsRead}}black{{else}}green{{end}} label">#{{.Index}}</div> |
188 |
| - <a class="title has-emoji" href="{{$.Link}}/{{.Index}}">{{.Title}}</a> |
189 |
| - |
190 |
| - {{if .Ref}} |
191 |
| - <a class="ui label" href="{{$.RepoLink}}/src/branch/{{.Ref}}">{{.Ref}}</a> |
| 187 | + <div class="ui {{if $issue.IsRead}}black{{else}}green{{end}} label">#{{$issue.Index}}</div> |
| 188 | + <a class="title has-emoji" href="{{$.Link}}/{{$issue.Index}}">{{$issue.Title}}</a> |
| 189 | + {{if $issue.IsPull}} |
| 190 | + {{template "repo/commit_status" (index $.IssuesStates $index)}} |
| 191 | + {{end}} |
| 192 | + {{if $issue.Ref}} |
| 193 | + <a class="ui label" href="{{$.RepoLink}}/src/branch/{{$issue.Ref}}">{{$issue.Ref}}</a> |
192 | 194 | {{end}}
|
193 |
| - {{range .Labels}} |
| 195 | + {{range $issue.Labels}} |
194 | 196 | <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}}">{{.Name}}</a>
|
195 | 197 | {{end}}
|
196 | 198 |
|
197 |
| - {{if .NumComments}} |
198 |
| - <span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span> |
| 199 | + {{if $issue.NumComments}} |
| 200 | + <span class="comment ui right"><i class="octicon octicon-comment"></i> {{$issue.NumComments}}</span> |
199 | 201 | {{end}}
|
200 | 202 |
|
201 | 203 | {{if .TotalTrackedTime}}
|
202 | 204 | <span class="comment ui right"><i class="octicon octicon-clock"></i> {{.TotalTrackedTime | Sec2Time}}</span>
|
203 | 205 | {{end}}
|
204 | 206 |
|
205 | 207 | <p class="desc">
|
206 |
| - {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}} |
| 208 | + {{$.i18n.Tr "repo.issues.opened_by" $timeStr $issue.Poster.HomeLink $issue.Poster.Name | Safe}} |
207 | 209 | {{$tasks := .GetTasks}}
|
208 | 210 | {{if gt $tasks 0}}
|
209 | 211 | {{$tasksDone := .GetTasksDone}}
|
210 | 212 | <span class="checklist">
|
211 | 213 | <span class="octicon octicon-checklist"></span> {{$tasksDone}} / {{$tasks}} <span class="progress-bar"><span class="progress" style="width:calc(100% * {{$tasksDone}} / {{$tasks}});"></span></span>
|
212 | 214 | </span>
|
213 | 215 | {{end}}
|
214 |
| - {{if .Milestone}} |
215 |
| - <a class="milestone" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}"> |
216 |
| - <span class="octicon octicon-milestone"></span> {{.Milestone.Name}} |
| 216 | + {{if $issue.Milestone}} |
| 217 | + <a class="milestone" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$issue.Milestone.ID}}&assignee={{$.AssigneeID}}"> |
| 218 | + <span class="octicon octicon-milestone"></span> {{$issue.Milestone.Name}} |
217 | 219 | </a>
|
218 | 220 | {{end}}
|
219 |
| - {{if ne .DeadlineUnix 0}} |
| 221 | + {{if ne $issue.DeadlineUnix 0}} |
220 | 222 | <span class="octicon octicon-calendar"></span>
|
221 |
| - <span{{if .IsOverdue}} class="overdue"{{end}}>{{.DeadlineUnix.FormatShort}}</span> |
| 223 | + <span{{if $issue.IsOverdue}} class="overdue"{{end}}>{{$issue.DeadlineUnix.FormatShort}}</span> |
222 | 224 | {{end}}
|
223 |
| - {{range .Assignees}} |
| 225 | + {{range $issue.Assignees}} |
224 | 226 | <a class="ui right assignee poping up" href="{{.HomeLink}}" data-content="{{.Name}}" data-variation="inverted" data-position="left center">
|
225 | 227 | <img class="ui avatar image" src="{{.RelAvatarLink}}">
|
226 | 228 | </a>
|
|
0 commit comments