This gets almost everything done, including Paging, but not search.

This commit is contained in:
Zed A. Shaw 2025-07-28 02:16:59 -04:00
parent da183c453c
commit 51b18823ae
7 changed files with 64 additions and 65 deletions

View file

@ -1,22 +1,11 @@
<script>
let Data = new GetJson("/api/admin/table/{{ .Table }}/{{ .Id }}/");
const ConfirmDelete = async (table, obj_id) => {
if(confirm("Are you sure?")) {
await fetch("/api/admin/table/" + table + "/" + obj_id + "/",
{ method: "DELETE" });
window.location = "/admin/table/" + table + "/";
} else {
console.log("NOOOOO");
return false;
}
}
</script>
<blockstart>
<h1>Admin Tables</h1>
<h1><a href="/admin/table/{{ .Table }}/">&laquo;</a>Admin {{ .Table }}</h1>
<block x-init="item = await Data.oneThing()" x-data="{item: {}}">
<block x-data="Data">
<form method="POST" action="/api/admin/table/{{ .Table }}/{{ .Id }}/">
<card>
<top><h1>{{ .Table }} : {{ .Id }}</h1></top>