Просмотр исходного кода

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 лет назад
Родитель
Сommit
199d67581a
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      templates/user/dashboard/issues.tmpl

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

@@ -73,6 +73,14 @@
 							{{if .NumComments}}
 							{{if .NumComments}}
 								<span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>
 								<span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>
 							{{end}}
 							{{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">
 							<p class="desc">
 								{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
 								{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}