aboutsummaryrefslogtreecommitdiff
path: root/cmd/monfront/templates/rows_to_table.html
blob: 04add218ae72705052136c502cb757811e829f4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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>