zedshaw.games/views/admin/table/contents.html

31 lines
780 B
HTML

<script>
let Tables = new GetJson("/api/admin/table/{{ .Table }}/")
console.log("Tables", Tables)
</script>
<blockstart>
<h1>Admin Tables</h1>
<block x-data="Tables">
<button type="button"><a href="/admin/new/table/{{ .Table }}/">New</a></button>
<table>
<template x-for="item in theData">
<tr>
<td>
<a x-bind:href="'/admin/table/{{ .Table }}/' + item.id + '/'">
#
</a>
</td>
<template x-for="(value, key) in item">
<td x-text="value"></td>
</template>
</tr>
</template>
</table>
<block class="horizontal">
<a href="/admin/table/{{.Table}}/?page=2">Prev</a>
<a href="/admin/table/{{.Table}}/?page=2">Next</a>
</block>
</block>
</blockstart>