mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19: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
|
@ -8,18 +8,18 @@
|
|||
<div class="color-error">You have no team boards to share - personal boards are never shown.</div>
|
||||
</div>
|
||||
{{else}}
|
||||
|
||||
|
||||
<div class="pull-left width-50">
|
||||
<div class="input-form">
|
||||
<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>
|
||||
<div class="input-control">
|
||||
<label>Show summary from (default 7 days ago)</label>
|
||||
{{input id="trello-since" value=config.since type="text" }}<br>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="input-control">
|
||||
<label>Select which boards you want to see</label>
|
||||
<div class="tip">All boards are selectd by default</div>
|
||||
|
@ -32,7 +32,7 @@
|
|||
{{else}}
|
||||
<i class="material-icons widget-checkbox checkbox-gray github-list-checkbox">check_box_outline_blank</i>
|
||||
{{/if}}
|
||||
<span style="background-color: {{board.prefs.backgroundColor}}">{{board.name}}</span>
|
||||
<span style="background-color: {{board.prefs.backgroundColor}}">{{board.idOrganization}} / {{board.name}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
@ -71,7 +71,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{else}}
|
||||
|
||||
<div class="pull-left width-50">
|
||||
|
|
|
@ -45,7 +45,12 @@ const boardsTemplate = `
|
|||
</a>
|
||||
</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">
|
||||
{{range $act, $tot := $b.ActionSummary}}
|
||||
{{$act}} ({{$tot}}),
|
||||
|
|
|
@ -13,9 +13,6 @@ package trello
|
|||
|
||||
const labelsTemplate = `
|
||||
<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}}
|
||||
<div class="heading">Labels</div>
|
||||
<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>
|
||||
</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>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
|
||||
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 +
|
||||
boardsTemplate +
|
||||
graphsTemplate +
|
||||
|
|
|
@ -16,7 +16,7 @@ const membersTemplate = `
|
|||
{{if gt (len .Boards) 0}}
|
||||
<div class="heading">Member Stats</div>
|
||||
<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>
|
||||
|
||||
<div class="section-trello-render">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue