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:
parent
308f117cca
commit
93a11200b4
3 changed files with 10 additions and 4 deletions
|
@ -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,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue