Browse Source

templates/user/dashboard/issues: show labels to each issue (#4976)

* add issue labels

* remove hyperlink from issue label

* wrap labels in right aligned span

* put issues with div

put the issue labels within a div so they don't interfere with the number of comments
James 6 years ago
parent
commit
199d67581a
1 changed files with 8 additions and 0 deletions
  1. 8 0
      templates/user/dashboard/issues.tmpl

+ 8 - 0
templates/user/dashboard/issues.tmpl

@@ -73,6 +73,14 @@
 							{{if .NumComments}}
 								<span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>
 							{{end}}
+							
+							<div>
+								<span class="ui right">
+									{{range .Labels}}
+										<a class="ui label" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{.Name | Sanitize}}</a>
+									{{end}}
+								</span>
+							</div>
 
 							<p class="desc">
 								{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}