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

New Trello design. Labels and Members. Working progress

This commit is contained in:
EnesAlili 2016-09-08 15:07:21 +01:00
parent 36b2767a6d
commit c51dc27b7f
3 changed files with 77 additions and 23 deletions

View file

@ -12,13 +12,24 @@
package trello
const labelsTemplate = `
<b>Labels</b><br>
{{range $l := .SharedLabels}}
<span style="background-color: {{ $l.Color }}">{{ $l.Name }}</span>
{{range $brd := $l.Boards}}
{{ $brd }},
{{end}}
<br>
{{end}}
<br>
<h3>Labels</h3>
<p>There are {{len .SharedLabels}} common labels across the boards.</p>
<div class="section-trello-render non-printable">
<table class="trello-table" class="width-100">
<tbody class="trello">
{{range $l := .SharedLabels}}
<tr>
<td class="width-15">
<span class="trello-label" style="background-color: {{ $l.Color }}">{{ $l.Name }} ({{len $l.Boards}})</span>
</td>
<td class="width-85">
{{range $brd := $l.Boards}}
{{ $brd }},
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
`

View file

@ -12,14 +12,28 @@
package trello
const membersTemplate = `
<b>Member Stats</b><br>
{{range $m := .MemberBoardAssign}}
<img src="https://trello-avatars.s3.amazonaws.com/{{$m.AvatarHash}}/50.png">
{{$m.MemberName}} :
{{range $ac := $m.AssignCounts}}
{{$ac.BoardName}} ({{$ac.Count}}),
{{end}}
<br>
{{end}}
<br>
<h3>Member Stats</h3>
<p> There are {{len .MemberBoardAssign}} members assigned to ##9 cards across {{len .Boards}} boards.</p>
<div class="section-trello-render non-printable">
<table class="trello-table" class="width-100">
<tbody>
{{range $m := .MemberBoardAssign}}
<tr>
<td class="width-15">
<img class="trello-avatar" src="https://trello-avatars.s3.amazonaws.com/{{$m.AvatarHash}}/50.png" height="50" alt="Member Avatar">
</td>
<td class="width-85">
<h6>{{$m.MemberName}}</h6>
{{range $ac := $m.AssignCounts}}
{{$ac.BoardName}} ({{$ac.Count}}),
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
`