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

More tweaks and updates to the Trello design

This commit is contained in:
EnesAlili 2016-09-09 16:47:47 +01:00
parent 1e37c68d99
commit a0ebb215d9
5 changed files with 111 additions and 56 deletions

View file

@ -14,29 +14,32 @@ package trello
const archiveTemplate = `
<h3>Deleted and Archived Cards</h3>
<p>Changes since {{.Since}}.</p>
{{range $b := .Boards}}
<div>
<p>For board
<a href="{{ $b.Board.URL }}">
<span style="background-color: {{$b.Board.Prefs.BackgroundColor}}">{{$b.Board.Name}}</span>
</a>
</p>
<div>
{{range $act := $b.Actions}}
{{if eq $act.Type "deleteCard" }}
Deleted:
{{$act.Data.List.Name}}/{{$act.Data.Card.Name}} - {{$act.Data.Text}}
<br>
{{end}}
{{end}}
{{range $arch := $b.Archived}}
Archived:
{{$arch.Name}} - {{$arch.Desc}}
<br>
{{end}}
</div>
</div>
{{end}}
<br>
<div class="section-trello-render">
<table class="trello-table" class="width-100">
<tbody class="trello">
{{range $b := .Boards}}
<tr>
<td>
<a href="{{ $b.Board.URL }}">
<span class="trello-board" style="background-color: {{$b.Board.Prefs.BackgroundColor}}">{{$b.Board.Name}}</span>
</a>
</td>
<td>
{{range $act := $b.Actions}}
{{if eq $act.Type "deleteCard" }}
Deleted:
{{$act.Data.List.Name}} : {{$act.Data.Card.Name}} - {{$act.Data.Text}}
{{end}}
{{end}}
{{range $arch := $b.Archived}}
Archived:
{{$arch.Name}} - {{$arch.Desc}}
<br>
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
`

View file

@ -15,27 +15,49 @@ const boardsTemplate = `
<h3>All Boards</h3>
<p>Changes since {{.Since}}.</p>
<p>{{len .Boards}} Boards, {{.ListTotal}} Lists, {{.CardTotal}} Cards, {{len .MemberBoardAssign}} Members</p>
{{range $b := .Boards}}
<div>
<a href="{{ $b.Board.URL }}">
<span style="background-color: {{$b.Board.Prefs.BackgroundColor}}">{{$b.Board.Name}}</span>
</a>
<p>There are {{ len $b.Actions }} actions for board</p>
<div>
{{range $act, $tot := $b.ActionSummary}}
{{$act}} ({{$tot}}),
{{end}}
{{if gt (len $b.Archived) 0}}
archive card ({{len $b.Archived}}).
<br>
{{end}}
</div>
</div>
{{end}}
<br>
<div class="section-trello-render">
<table class="trello-table" class="width-100">
<tbody class="board-stats">
<tr>
<td>
<span class="stat-number">{{len .Boards}}</span> Boards
</td>
<td>
<span class="stat-number">{{.ListTotal}}</span> Lists
</td>
<td>
<span class="stat-number">{{.CardTotal}}</span> Cards
</td>
<td>
<span class="stat-number">{{len .MemberBoardAssign}}</span> Members
</td>
</tr>
</tbody>
</table>
<table class="trello-table" class="width-100">
<tbody class="trello">
{{range $b := .Boards}}
<tr>
<td>
<a href="{{ $b.Board.URL }}">
<span class="trello-board" style="background-color: {{$b.Board.Prefs.BackgroundColor}}">{{$b.Board.Name}}</span>
</a>
</td>
<td>
<h6>There are {{ len $b.Actions }} actions for this board.</h6>
<p>
{{range $act, $tot := $b.ActionSummary}}
{{$act}} ({{$tot}}),
{{end}}
{{if gt (len $b.Archived) 0}}
archive card ({{len $b.Archived}}).
<br>
{{end}}
</p>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
`

View file

@ -14,7 +14,7 @@ package trello
const labelsTemplate = `
<h3>Labels</h3>
<p>There are {{len .SharedLabels}} common labels across the boards.</p>
<div class="section-trello-render non-printable">
<div class="section-trello-render">
<table class="trello-table" class="width-100">
<tbody class="trello">
{{range $l := .SharedLabels}}

View file

@ -17,20 +17,22 @@ const membersTemplate = `
There are {{len .MemberBoardAssign}} members assigned to {{.CardAssignTotal}} cards of the total {{.CardTotal}} cards across {{len .Boards}} boards.
</p>
<div class="section-trello-render non-printable">
<div class="section-trello-render">
<table class="trello-table" class="width-100">
<tbody>
{{range $m := .MemberBoardAssign}}
<tr>
<td class="width-15">
<td>
<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">
<td>
<h6>{{$m.MemberName}}</h6>
{{range $ac := $m.AssignCounts}}
{{$ac.BoardName}} ({{$ac.Count}}),
{{end}}
<p>
{{range $ac := $m.AssignCounts}}
{{$ac.BoardName}} ({{$ac.Count}}),
{{end}}
</p>
</td>
</tr>
{{end}}