2017-06-21 20:07:17 +00:00
|
|
|
<table id="games-table" class="hidden sortable pure-table pure-table-bordered center">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2017-06-21 22:09:26 +00:00
|
|
|
<th>Team</th>
|
2017-06-21 20:07:17 +00:00
|
|
|
<th>Game Name</th>
|
2017-06-21 22:09:26 +00:00
|
|
|
<th></th>
|
2017-06-21 20:07:17 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{ range $i, $v := .TemplateData.Games }}
|
|
|
|
<tr>
|
2017-06-21 22:09:26 +00:00
|
|
|
<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>
|
2017-06-21 20:07:17 +00:00
|
|
|
</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>
|