mirror of
https://github.com/documize/community.git
synced 2025-08-04 21:15:24 +02:00
Tidy HTML, separate detailed single-board data
This commit is contained in:
parent
2d7647e790
commit
0345c93560
8 changed files with 155 additions and 134 deletions
|
@ -12,52 +12,55 @@
|
|||
package trello
|
||||
|
||||
const boardsTemplate = `
|
||||
|
||||
<h3>Boards</h3>
|
||||
<p>Changes since {{.Since}}.</p>
|
||||
<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}}).
|
||||
{{if gt (len .Boards) 0}}
|
||||
<div class="heading">Boards</div>
|
||||
<p>Changes since {{.Since}}.</p>
|
||||
<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}}).
|
||||
{{else}}
|
||||
no cards archived.
|
||||
{{end}}
|
||||
<br>
|
||||
{{end}}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue