A website for my game dev stuff that supports chat, etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
zedshaw-games/views/admin/table/contents.html

37 lines
1.0 KiB

<script>
let thePage = new PaginateTable("/api/admin/table/{{ .Table }}/");
</script>
<blockstart>
<h1><a href="/admin/table/">&laquo;</a> Admin {{ .Table }}</h1>
<block x-data="thePage">
<block class="horizontal">
<button type="button"><a href="/admin/new/table/{{ .Table }}/">New</a></button>
<button type="button" @click="page -= 1">Prev</button>
<button type="button" @click="page += 1">Next</button>
<input type="text" x-model.debounce="search_query" name="search" size="40" placeholder="Search" />
</block>
<table>
<tr>
<th>#</th>
<template x-for="header in headers">
<th x-text="header"></th>
</template>
</tr>
<template x-for="item in contents" :key="item.id">
<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>
</blockstart>