mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
hide labels when none shared
This commit is contained in:
parent
a0ebb215d9
commit
a7a2267e5c
3 changed files with 25 additions and 24 deletions
|
@ -13,7 +13,7 @@ package trello
|
|||
|
||||
const boardsTemplate = `
|
||||
|
||||
<h3>All Boards</h3>
|
||||
<h3>Boards</h3>
|
||||
<p>Changes since {{.Since}}.</p>
|
||||
<div class="section-trello-render">
|
||||
<table class="trello-table" class="width-100">
|
||||
|
|
|
@ -12,24 +12,26 @@
|
|||
package trello
|
||||
|
||||
const labelsTemplate = `
|
||||
<h3>Labels</h3>
|
||||
<p>There are {{len .SharedLabels}} common labels across the boards.</p>
|
||||
<div class="section-trello-render">
|
||||
<table class="trello-table" class="width-100">
|
||||
<tbody class="trello">
|
||||
{{range $l := .SharedLabels}}
|
||||
<tr>
|
||||
<td class="width-25">
|
||||
<span class="trello-label" style="background-color: {{ $l.Color }}">{{ $l.Name }} ({{len $l.Boards}})</span>
|
||||
</td>
|
||||
<td class="width-75">
|
||||
{{range $brd := $l.Boards}}
|
||||
{{ $brd }},
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{if gt (len .SharedLabels) 0}}
|
||||
<h3>Labels</h3>
|
||||
<p>There are {{len .SharedLabels}} common labels across the boards.</p>
|
||||
<div class="section-trello-render">
|
||||
<table class="trello-table" class="width-100">
|
||||
<tbody class="trello">
|
||||
{{range $l := .SharedLabels}}
|
||||
<tr>
|
||||
<td class="width-25">
|
||||
<span class="trello-label" style="background-color: {{ $l.Color }}">{{ $l.Name }} ({{len $l.Boards}})</span>
|
||||
</td>
|
||||
<td class="width-75">
|
||||
{{range $brd := $l.Boards}}
|
||||
{{ $brd }},
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
`
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
|
||||
package trello
|
||||
|
||||
const renderTemplate = `
|
||||
<h3>Header for Trello Multi-Board Test (in master_template.go)</h3>
|
||||
` + labelsTemplate +
|
||||
const renderTemplate = `` +
|
||||
labelsTemplate +
|
||||
boardsTemplate +
|
||||
graphsTemplate +
|
||||
membersTemplate +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue