mirror of
https://github.com/documize/community.git
synced 2025-07-23 23:29:42 +02:00
Fixed copy render for plural and singular data
This commit is contained in:
parent
a2cc971821
commit
308f117cca
5 changed files with 15 additions and 12 deletions
|
@ -12,7 +12,7 @@
|
||||||
<div class="pull-left width-50">
|
<div class="pull-left width-50">
|
||||||
<div class="input-form">
|
<div class="input-form">
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<div class="title">Select Board & Lists</div>
|
<div class="title">Select Board & Lists</div>
|
||||||
<div class="tip">Choose lists to include from board</div>
|
<div class="tip">Choose lists to include from board</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="material-icons widget-checkbox checkbox-gray github-list-checkbox">check_box_outline_blank</i>
|
<i class="material-icons widget-checkbox checkbox-gray github-list-checkbox">check_box_outline_blank</i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<span style="background-color: {{board.prefs.backgroundColor}}">{{board.name}}</span>
|
<span style="background-color: {{board.prefs.backgroundColor}}">{{board.idOrganization}} / {{board.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -45,7 +45,12 @@ const boardsTemplate = `
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="board-summary">There are {{ len $b.Actions }} actions for this board.</div>
|
<div class="board-summary">There
|
||||||
|
{{if eq 1 (len $b.Actions)}} is {{else}} are {{end}}
|
||||||
|
{{ len $b.Actions }}
|
||||||
|
{{if eq 1 (len $b.Actions)}}action {{else}} actions {{end}}
|
||||||
|
for this board.
|
||||||
|
</div>
|
||||||
<span class="board-meta">
|
<span class="board-meta">
|
||||||
{{range $act, $tot := $b.ActionSummary}}
|
{{range $act, $tot := $b.ActionSummary}}
|
||||||
{{$act}} ({{$tot}}),
|
{{$act}} ({{$tot}}),
|
||||||
|
|
|
@ -13,9 +13,6 @@ package trello
|
||||||
|
|
||||||
const labelsTemplate = `
|
const labelsTemplate = `
|
||||||
<div class="section-trello-render">
|
<div class="section-trello-render">
|
||||||
|
|
||||||
<p>Activity since #date for team Documize boards: <a class="link" href="#">Board Name</a></p>
|
|
||||||
|
|
||||||
{{if gt (len .SharedLabels) 0}}
|
{{if gt (len .SharedLabels) 0}}
|
||||||
<div class="heading">Labels</div>
|
<div class="heading">Labels</div>
|
||||||
<p>There are {{len .SharedLabels}} common labels across the boards.</p>
|
<p>There are {{len .SharedLabels}} common labels across the boards.</p>
|
||||||
|
@ -28,7 +25,7 @@ const labelsTemplate = `
|
||||||
<span class="trello-label" style="background-color: {{ $l.Color }}">{{ $l.Name }} ({{len $l.Boards}})</span>
|
<span class="trello-label" style="background-color: {{ $l.Color }}">{{ $l.Name }} ({{len $l.Boards}})</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="link" href="#">{{range $idx, $brd := $l.Boards}}{{if gt $idx 0}}</a>, {{end}}{{ $brd }}{{end}}.
|
{{range $idx, $brd := $l.Boards}}{{if gt $idx 0}}, {{end}}<a class="link" href="#">{{ $brd }}</a>{{end}}.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
|
|
||||||
package trello
|
package trello
|
||||||
|
|
||||||
const renderTemplate = `` +
|
const renderTemplate = `<p>Activity since {{.Since}} for boards:
|
||||||
|
{{range $idx, $brd := .Boards}}{{if gt $idx 0}}, {{end}}<a class="link" href="{{$brd.Board.URL}}">{{$brd.Board.Name}}</a>{{end}}.</p>` +
|
||||||
labelsTemplate +
|
labelsTemplate +
|
||||||
boardsTemplate +
|
boardsTemplate +
|
||||||
graphsTemplate +
|
graphsTemplate +
|
||||||
|
|
|
@ -16,7 +16,7 @@ const membersTemplate = `
|
||||||
{{if gt (len .Boards) 0}}
|
{{if gt (len .Boards) 0}}
|
||||||
<div class="heading">Member Stats</div>
|
<div class="heading">Member Stats</div>
|
||||||
<p>
|
<p>
|
||||||
There are {{len .MemberBoardAssign}} members assigned to {{.CardAssignTotal}} cards of the total {{.CardTotal}} cards across {{len .Boards}} boards.
|
There {{if eq 1 (len .MemberBoardAssign)}} is one member {{else}} are {{len .MemberBoardAssign}} members {{end}} assigned to {{.CardAssignTotal}} cards of the total {{.CardTotal}} cards across {{len .Boards}} boards.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="section-trello-render">
|
<div class="section-trello-render">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue