ictgj-voting/templates/admin-games.html

30 lines
809 B
HTML

<table id="games-table" class="hidden sortable pure-table pure-table-bordered center">
<thead>
<tr>
<th>Team</th>
<th>Game Name</th>
<th></th>
</tr>
</thead>
<tbody>
{{ range $i, $v := .TemplateData.Games }}
<tr>
<td>{{ $v.Team.Name }}</td>
<td>{{ $v.Game.Name }}</td>
<td>
<a href="/admin/teams/{{ $v.Team.UUID }}/edit#game" class="pure-button pure-button-plain"><i class="fa fa-pencil"></i></a>
</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>