ictgj-voting/templates/admin-games.html

24 lines
556 B
HTML
Raw Normal View History

2017-06-21 20:07:17 +00:00
<table id="games-table" class="hidden sortable pure-table pure-table-bordered center">
<thead>
<tr>
<th>Game Name</th>
</tr>
</thead>
<tbody>
{{ range $i, $v := .TemplateData.Games }}
<tr>
<td>{{ $v.Name }}</td>
</tr>
{{ end }}
</tbody>
</table>
<script>
snack.ready(function() {
var tableBody = document.querySelector("#games-table>tbody");
if(tableBody.children.length>0) {
// Show the table
document.getElementById('games-table').classList.remove('hidden');
}
});
</script>