1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 05:39:42 +02:00
documize/core/section/trello/boards_template.go

56 lines
1.7 KiB
Go
Raw Normal View History

// 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 }}">
2016-09-12 21:09:40 +01:00
<div class="trello-board" style="background-color: {{$b.Board.Prefs.BackgroundColor}}">
{{$b.Board.Name}}
<span>{{$b.Board.OrgName}}</span>
</div>
2016-09-12 01:29:26 +01:00
</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}} -->
</div>
2016-09-12 01:29:26 +01:00
<span class="board-meta">
{{range $act, $tot := $b.ActionSummary}}
{{$tot}} {{$act}}{{if ne 1 $tot}}s{{end}},
2016-09-12 01:29:26 +01:00
{{end}}
{{if gt (len $b.Archived) 0}}
{{len $b.Archived}} {{if eq 1 (len $b.Archived)}}card {{else}} cards {{end}}archived
2016-09-12 01:29:26 +01:00
{{else}}
2016-09-12 21:09:40 +01:00
no cards archived
2016-09-12 01:29:26 +01:00
{{end}}
<br>
</span>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
{{end}}
</div>
`