Skip to content

Commit

Permalink
add octicons based on issue type (pull|issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Aug 16, 2020
1 parent f50364a commit 57be8d2
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion templates/repo/issue/milestone_issues.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,30 @@
<input type="checkbox" data-issue-id={{.ID}}></input>
</div>
{{end}}
<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>

{{if .IsPull }}
{{if .IsClosed}}
{{if .PullRequest.HasMerged}}
<div class="ui purple label">#{{.Index}}</div>
<a class="ui purple text">{{svg "octicon-git-pull-request" 16}}</a>
{{else}}
<div class="ui red label">#{{.Index}}</div>
<a class="ui red text">{{svg "octicon-git-pull-request" 16}}</a>
{{end}}
{{else}}
<div class="ui green label">#{{.Index}}</div>
<a class="ui green text">{{svg "octicon-git-pull-request" 16}}</a>
{{end}}
{{else}}
{{if .IsClosed}}
<div class="ui red label">#{{.Index}}</div>
<a class="ui red text">{{svg "octicon-issue-closed" 16}}</a>
{{else}}
<div class="ui green label">#{{.Index}}</div>
<a class="ui green text">{{svg "octicon-issue-opened" 16}}</a>
{{end}}
{{end}}

<a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji}}</a>

{{if .IsPull }}
Expand Down

0 comments on commit 57be8d2

Please sign in to comment.