30 lines
805 B
HTML
30 lines
805 B
HTML
|
{{define "content_tabledetail"}}
|
||
|
<table class="table table-hover" {{ if .ID }}id="{{.ID}}"{{end}}>
|
||
|
{{$stylecell := "table-success"}}
|
||
|
{{if .HeadClass }}{{$stylecell = .HeadClass}}{{end}}
|
||
|
{{if .Title }}
|
||
|
<thead class="{{.HeadClass}}">
|
||
|
<tr>
|
||
|
<th colspan="2" class="{{$stylecell}}">{{ .Title }}</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
{{end}}
|
||
|
<tbody>
|
||
|
{{range $item := .AllTD}}
|
||
|
<tr scope="row" {{ if $item.ID }}id="{{$item.ID}}"{{end}}>
|
||
|
<td class="{{$stylecell}}">{{ $item.Caption }}</td>
|
||
|
<td>
|
||
|
{{ if eq $item.ValueType "href"}}
|
||
|
{{template "content_href" $item.Value}}
|
||
|
{{ else if eq $item.ValueType "badge"}}
|
||
|
{{template "content_badge" $item.Value}}
|
||
|
{{ else }}
|
||
|
{{ $item.Value }}
|
||
|
{{end}}
|
||
|
</td>
|
||
|
</tr>
|
||
|
{{end}}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
{{end}}
|