diff options
Diffstat (limited to 'cmd/monfront/templates/rows_to_table.html')
-rw-r--r-- | cmd/monfront/templates/rows_to_table.html | 19 |
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> |