1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 07:09:43 +02:00

Make label board names clickable

This commit is contained in:
Elliott Stoneham 2016-09-12 12:21:34 +01:00
parent 308f117cca
commit 93a11200b4
3 changed files with 10 additions and 4 deletions

View file

@ -543,7 +543,8 @@ func buildPayloadAnalysis(config *trelloConfig, render *trelloRender) {
if _, exists := labels[lab.Name]; !exists {
labels[lab.Name] = labT{color: lab.Color, boards: make(map[string]bool)}
}
labels[lab.Name].boards[brd.Board.Name] = true
labels[lab.Name].boards[fmt.Sprintf(`<a class="link" href="%s">%s</a>`,
brd.Board.URL, brd.Board.Name)] = true
}
// process member stats
@ -588,8 +589,12 @@ func buildPayloadAnalysis(config *trelloConfig, render *trelloRender) {
brds = append(brds, bname)
}
sort.Strings(brds)
htm := []template.HTML{}
for _, h := range brds {
htm = append(htm, template.HTML(h))
}
render.SharedLabels = append(render.SharedLabels, trelloSharedLabel{
Name: lname, Color: labels[lname].color, Boards: brds,
Name: lname, Color: labels[lname].color, Boards: htm,
})
}
}