Working on Results Page

This commit is contained in:
2017-07-06 12:09:49 -05:00
parent 7162c8c34d
commit 02dbfc39ca
10 changed files with 537 additions and 43 deletions

View File

@@ -2,13 +2,28 @@
<thead>
<tr>
<th>Timestamp</th>
<th>Client ID</th>
<th>Rankings</th>
</tr>
</thead>
<tbody>
{{ range $i, $v, := .Site.AllVotes }}
{{ range $i, $v := .TemplateData.AllVotes }}
<tr>
<td>{{ $v.Timestamp }}</td>
<td>{{ $v.ClientId }}</td>
<td>
<ol>
{{ range $ci, $cv := $v.Choices }}
<li>{{ $cv.Name }}</li>
{{ end }}
</ol>
</td>
</tr>
{{ end }}
</tbody>
<tfoot>
<tr>
<td class="left" colspan="3">{{ len .Site.Votes }} Total Votes</td>
</tr>
</tfoot>
</table>

View File

@@ -237,10 +237,6 @@ function getRankedCSV() {
for(var i = 0; i < r.length; i++) {
ret = ret + r[i].uuid+",";
}
// Remove the trailing ","
if(ret.endsWith(",")) {
ret = ret.slice(0, ret.length-2);
}
return ret;
}