ictgj-voting/templates/admin-clients.html

33 lines
1023 B
HTML
Raw Normal View History

{{ if not .TemplateData.Clients }}
2017-07-28 19:36:14 +00:00
<div class="space-vertical">No additional clients have been authenticated</div>
{{ else }}
2017-07-28 19:36:14 +00:00
<table id="clients-table" class="sortable pure-table pure-table-bordered center">
2017-06-08 17:20:43 +00:00
<thead>
<tr>
2017-07-28 19:36:14 +00:00
<th>Friendly Name</th>
2017-06-08 17:20:43 +00:00
<th>Client ID</th>
<th>Last Known IP</th>
2017-07-28 19:36:14 +00:00
<th>Authenticated</th>
<th></th>
2017-06-08 17:20:43 +00:00
</tr>
</thead>
<tbody>
{{ range $i, $v := .TemplateData.Clients }}
<tr>
2017-07-28 19:36:14 +00:00
<td>{{ $v.Name }}</td>
<td>{{ $v.UUID }}</td>
<td>{{ $v.IP }}</td>
<td>{{ if $v.Auth }} Yes {{ else }} No {{ end }}</td>
2017-06-08 17:20:43 +00:00
<td>
2017-07-28 19:36:14 +00:00
{{ if $v.Auth }}
<a href="/admin/clients/{{ $v.UUID }}/deauth" class="primary"><i class="fa fa-2 fa-toggle-on"></i></a>
{{ else }}
<a href="/admin/clients/{{ $v.UUID }}/auth" class="error"><i class="fa fa-2 fa-toggle-off"></i></a>
{{ end }}
2017-06-08 17:20:43 +00:00
</td>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}