{{define "poll-choice"}}
{{.label}} {{.votes}} ({{printf "%.1f" (.poll.VotePercentage .votes)}}%)
{{end}} {{define "poll"}}
{{template "poll-choice" (dict "label" .Choice1 "votes" .Choice1_Votes "poll" .)}} {{template "poll-choice" (dict "label" .Choice2 "votes" .Choice2_Votes "poll" .)}} {{if (gt .NumChoices 2)}} {{template "poll-choice" (dict "label" .Choice3 "votes" .Choice3_Votes "poll" .)}} {{end}} {{if (gt .NumChoices 3)}} {{template "poll-choice" (dict "label" .Choice4 "votes" .Choice4_Votes "poll" .)}} {{end}}

{{if .IsOpen}} Poll open, voting ends at {{.FormatEndsAt}} {{else}} Poll ended {{.FormatEndsAt}} {{end}} - {{.TotalVotes}} votes

{{end}}