Display votes in non-anonymous voting results

This commit is contained in:
Brian Wiborg 2024-05-13 12:46:13 +02:00
parent 58cb8645a4
commit f2f8265499
No known key found for this signature in database
GPG key ID: BE53FA9286B719D6
6 changed files with 42 additions and 5 deletions

View file

@ -118,4 +118,28 @@
Quorum: FAILED
</p>
{{ end }}
{{ if not .Voting.Anonymous }}
<div class="relative overflow-x-auto py-4">
<table class="w-full text-sm text-left rtl:text-right text-gray-400 text-center mt-4">
<thead cols=3>
<h1 class="text-center text-4xl border-t border-gray-700 pt-4 text-gray-400">VOTES</h1>
</thead>
<tbody>
{{ range $vote := .Voting.Votes }}
<tr class="border-b border-t bg-gray-800 border-gray-700">
<td class="px-2 py-2">
{{ $vote.Choice }}
</td>
<td class="px-2 py-2 semibold">
{{ $vote.Elector }}
</td>
<td class="px-2 py-2">
{{ $vote.Id }}
</td>
</tr>
</tbody>
</table>
</div>
{{ end }}
{{ end }}
{{ end }}