aboutsummaryrefslogtreecommitdiff
path: root/cmd/monfront/templates/rows_to_table.html
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2022-12-15 11:16:56 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2022-12-15 11:16:56 +0100
commite29f38937cdf077a99b45c27e49f553d4dd8d0d7 (patch)
tree38509003a153a0100cb1a69a5d7a752ad2ff7616 /cmd/monfront/templates/rows_to_table.html
parent49dac92034f352698429ee1d78d4bfb070006693 (diff)
monfront - add basic interface to create some entities
Diffstat (limited to 'cmd/monfront/templates/rows_to_table.html')
-rw-r--r--cmd/monfront/templates/rows_to_table.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/cmd/monfront/templates/rows_to_table.html b/cmd/monfront/templates/rows_to_table.html
new file mode 100644
index 0000000..04add21
--- /dev/null
+++ b/cmd/monfront/templates/rows_to_table.html
@@ -0,0 +1,19 @@
+ <table>
+ <tr>
+ {{ range $col := .Columns }}
+ <th>{{ $col }}</th>
+ {{ end }}
+ <th></th>
+ </tr>
+ {{ range $row := .Rows }}
+ <tr>
+ {{ range $col := $row }}
+ <td>{{ if $col.Valid }}{{ $col.String }}{{ end }}</td>
+ {{ end }}
+ <td>
+ <button name="update" value="{{ (index $row 0).String }}">update</button>
+ <button name="delete" value="{{ (index $row 0).String }}">delete</button>
+ </td>
+ </tr>
+ {{ end }}
+ </table>