diff options
author | 6543 <6543@obermui.de> | 2020-08-17 21:11:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 15:11:42 -0400 |
commit | 1984b6a11b2e6f9a2aac795b3463d5c03400f435 (patch) | |
tree | 2d1ee6875401037a87c3f7fb3788eb6da1e97d34 /templates | |
parent | 5b9e7cf53c36fa9a99cd8505c7008ad7b1976db6 (diff) | |
download | gitea-1984b6a11b2e6f9a2aac795b3463d5c03400f435.tar.gz gitea-1984b6a11b2e6f9a2aac795b3463d5c03400f435.zip |
Milestone Issue/Pull List: Add octicons type (#12499)
* add octicons based on issue type (pull|issue)
* handle IsRead again
* short code
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/milestone_issues.tmpl | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index 00d335da7d..8aecf8d773 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -188,7 +188,33 @@ <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 .IsClosed}} + {{if .IsPull}} + {{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 red label">#{{.Index}}</div> + <a class="ui red text">{{svg "octicon-issue-closed" 16}}</a> + {{end}} + {{else}} + {{if .IsRead}} + <div class="ui white label">#{{.Index}}</div> + {{else}} + <div class="ui green label">#{{.Index}}</div> + {{end}} + {{if .IsPull}} + <a class="ui green text">{{svg "octicon-git-pull-request" 16}}</a> + {{else}} + <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 }} |