1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 06:09:42 +02:00
documize/core/section/trello/trad_template.go

62 lines
1.6 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 tradTemplate = `
2016-09-12 01:29:26 +01:00
<div class="section-trello-render">
{{if ne .Detail.Board.ID ""}}
2016-09-28 15:09:37 +01:00
<div class="heading" style="background-color: {{.Detail.Board.Prefs.BackgroundColor}}">
<h3><a href="{{ .Detail.Board.URL }}">{{.Detail.Board.Name}} Board</a></h3>
<p>There are {{ .Detail.CardCount }} cards across {{ .Detail.ListCount }} lists</p>
</div>
2016-09-12 01:29:26 +01:00
<p class="non-printable-message">Non-printable</p>
<div class="section-trello-render non-printable">
2016-09-28 15:09:37 +01:00
<div class="single-trello-board">
<table class="trello-single-board" style="width: 100%;">
2016-09-12 01:29:26 +01:00
{{range $data := .Detail.Data}}
2016-09-28 15:09:37 +01:00
<thead>
<tr>
<th class="title">{{ $data.List.Name }} <span>{{len $data.Cards}}</span></th>
</tr>
<tr>
</tr>
</thead>
<tbody>
{{range $card := $data.Cards}}
<tr>
<td>
<a href="{{ $card.URL }}">
<div class="trello-card">
{{ $card.Name }}
</div>
</a>
</td>
<td>
{{range $label := $card.Labels}}
<span style="background-color:{{$label.Color}}"> {{$label.Name}} </span>
{{end}}
</td>
</tr>
{{end}}
</tbody>
2016-09-12 01:29:26 +01:00
{{end}}
2016-09-28 15:09:37 +01:00
</table>
2016-09-12 01:29:26 +01:00
</div>
</div>
2016-09-12 01:29:26 +01:00
{{end}}
</div>
2016-09-28 15:09:37 +01:00
`