2016-09-07 18:07:37 +01:00
|
|
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
|
|
|
//
|
|
|
|
// This software (Documize Community Edition) is licensed under
|
|
|
|
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
|
|
|
//
|
|
|
|
// You can operate outside the AGPL restrictions by purchasing
|
|
|
|
// Documize Enterprise Edition and obtaining a commercial license
|
|
|
|
// by contacting <sales@documize.com>.
|
|
|
|
//
|
|
|
|
// https://documize.com
|
|
|
|
|
|
|
|
package trello
|
|
|
|
|
|
|
|
const boardsTemplate = `
|
2016-09-12 01:29:26 +01:00
|
|
|
<div class="section-trello-render">
|
|
|
|
{{if gt (len .Boards) 0}}
|
|
|
|
<div class="heading">Boards</div>
|
2016-09-12 20:47:11 +01:00
|
|
|
<p>There are {{len .Boards}} boards, {{.ListTotal}} since lists, {{.CardTotal}} cards and {{len .MemberBoardAssign}} members {{.Since}}.</p>
|
2016-09-12 01:29:26 +01:00
|
|
|
<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>
|
2016-09-12 20:47:11 +01:00
|
|
|
<div class="board-summary">
|
|
|
|
{{ len $b.Actions }}{{if eq 1 (len $b.Actions)}}action {{else}} actions {{end}}
|
2016-09-12 11:47:30 +01:00
|
|
|
</div>
|
2016-09-12 01:29:26 +01:00
|
|
|
<span class="board-meta">
|
|
|
|
{{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>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2016-09-07 18:07:37 +01:00
|
|
|
`
|