2024-10-14 13:13:51 -04:00
|
|
|
{{define "content_table"}}
|
2024-10-15 17:09:17 -04:00
|
|
|
<table class="table table-hover {{.TableClass}}" {{ if .ID }}id="{{.ID}}"{{end}}>
|
|
|
|
<thead class="{{.HeadClass}}">
|
2024-10-14 13:13:51 -04:00
|
|
|
<tr>
|
|
|
|
{{range $index, $col := .AllTH}}<th {{ if .ID }}id="{{.ID}}"{{end}} scope="col">{{ $col.Value }}</th>{{end}}
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2024-10-15 23:15:20 -04:00
|
|
|
{{- range .AllTD}}<tr scope="row">
|
2024-10-15 17:09:17 -04:00
|
|
|
{{range $index, $item := .}}<td {{ if $item.ID }}id="{{$item.ID}}"{{end}}>
|
|
|
|
{{ with $x := index $.AllTH $index }}
|
|
|
|
{{ if eq $x.ValueType "href"}}
|
|
|
|
{{template "content_href" $item.Value}}
|
|
|
|
{{ else if eq $x.ValueType "badge"}}
|
|
|
|
{{template "content_badge" $item.Value}}
|
|
|
|
{{ else }}
|
|
|
|
{{ $item.Value }}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</td>
|
|
|
|
{{end}}</tr>
|
2024-10-15 23:15:20 -04:00
|
|
|
{{- end}}
|
2024-10-14 13:13:51 -04:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2024-10-15 23:15:20 -04:00
|
|
|
{{end}}
|