This gets almost everything done, including Paging, but not search.
This commit is contained in:
parent
da183c453c
commit
51b18823ae
7 changed files with 64 additions and 65 deletions
|
@ -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 }}/">«</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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue