55 lines
2.2 KiB
HTML
55 lines
2.2 KiB
HTML
{{define "tabler_table"}}
|
|
<div class="table-responsive">
|
|
<table class="table table-vcenter card-table">
|
|
<thead>
|
|
<tr>
|
|
{{range .TableHeaders}}
|
|
<th{{if .Sort}} data-sort="{{.Sort}}"{{end}}>{{.Name}}</th>
|
|
{{end}}
|
|
<th class="w-1"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .TableRows}}
|
|
<tr>
|
|
<td>
|
|
<div class="d-flex py-1 align-items-center">
|
|
<span class="avatar me-2" style="background-image: url(/static/avatars/{{.AvatarID}}.jpg)"></span>
|
|
<div class="flex-fill">
|
|
<div class="font-weight-medium">{{.Name}}</div>
|
|
<div class="text-secondary"><a href="#" class="text-reset">{{.Email}}</a></div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div>{{.City}}</div>
|
|
<div class="text-secondary">{{.Country}}</div>
|
|
</td>
|
|
<td>
|
|
<span class="status-dot {{if eq .Status "active"}}status-dot-animated bg-green{{else if eq .Status "inactive"}}bg-muted{{else}}bg-blue{{end}}"></span>
|
|
{{.Status}}
|
|
</td>
|
|
<td>{{.Date}}</td>
|
|
<td>
|
|
<div class="row g-1">
|
|
{{range .Tags}}
|
|
<div class="col-auto">
|
|
<span class="badge bg-green-lt text-uppercase">{{.}}</span>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="badge {{if eq .Category "Design"}}bg-purple-lt{{else if eq .Category "Engineering"}}bg-blue-lt{{else if eq .Category "Sales"}}bg-green-lt{{else if eq .Category "Marketing"}}bg-orange-lt{{else if eq .Category "Finance"}}bg-yellow-lt{{else}}bg-muted-lt{{end}}">{{.Category}}</span>
|
|
</td>
|
|
<td>
|
|
<a href="#" class="btn btn-ghost btn-icon btn-sm" data-bs-toggle="dropdown">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{end}}
|