mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Group Label Changed Comments in timeline (#13304)
* Create function to group label comments * Combine multiple label additions into one * Group removed and added labels in the same comment * Fix indentation on comments.tmpl Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		@@ -343,6 +343,16 @@ func NewFuncMap() []template.FuncMap {
 | 
			
		||||
			// the table is NOT sorted with this header
 | 
			
		||||
			return ""
 | 
			
		||||
		},
 | 
			
		||||
		"RenderLabels": func(labels []*models.Label) template.HTML {
 | 
			
		||||
			html := ""
 | 
			
		||||
 | 
			
		||||
			for _, label := range labels {
 | 
			
		||||
				html = fmt.Sprintf("%s<div class='ui label' style='color: %s; background-color: %s'>%s</div>",
 | 
			
		||||
					html, label.ForegroundColor(), label.Color, RenderEmoji(label.Name))
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			return template.HTML(html)
 | 
			
		||||
		},
 | 
			
		||||
	}}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user