Now have a simple table list index and a table view, but the templates aren't good enough to easily use the Go reflect data. Will find one tomorrow that's better.

This commit is contained in:
Zed A. Shaw 2025-07-15 01:36:24 -04:00
parent d481c260c5
commit fa7f886a59
3 changed files with 55 additions and 2 deletions

View file

@ -1 +1,13 @@
<h1>Admin!</h1>
<blockstart>
<h1>Admin Tables</h1>
<block>
{{range $index, $element := .Tables}}
<ul>
<li><a href="/admin/table/{{ $element }}/">{{ $element }}</a></li>
</ul>
{{ end }}
</block>
</blockstart>

View file

@ -0,0 +1,17 @@
<blockstart>
<h1>{{ .TableName }} </h1>
<block>
<table>
<tr><th>ID</th></tr>
{{ range $index, $row := .Table }}
<tr>
<td>{{ $row }}</td>
</tr>
{{ end }}
</table>
</block>
</blockstart>