ictgj-voting/templates/admin-votes.html

38 lines
881 B
HTML

<div class="results-container">
<h2>Current Results</h2>
{{ range $i, $v := .TemplateData.Results }}
{{ range $ti, $tv := $v.Teams }}
{{ $v.Rank }}: {{ $tv.Name }}<br />
{{ end }}
{{ end }}
</div>
<table id="votes-table" class="sortable pure-table pure-table-bordered center">
<thead>
<tr>
<th>Time</th>
<th>Rankings</th>
<th class="only-large">Client ID</th>
</tr>
</thead>
<tbody>
{{ range $i, $v := .TemplateData.AllVotes }}
<tr>
<td>{{ $v.Timestamp }}</td>
<td>
<ol>
{{ range $ci, $cv := $v.Choices }}
<li>{{ $cv.Name }}</li>
{{ end }}
</ol>
</td>
<td class="only-large">{{ $v.ClientId }}</td>
</tr>
{{ end }}
</tbody>
<tfoot>
<tr>
<td class="left" colspan="3">{{ len .TemplateData.AllVotes }} Total Votes</td>
</tr>
</tfoot>
</table>