cacert-boardvoting/ui/html/pages/users.html

44 lines
1.7 KiB
HTML
Raw Normal View History

{{ define "title"}}User Management{{ end }}
{{ define "main"}}
{{ if .Users }}
2022-05-29 18:46:52 +00:00
<table class="ui selectable basic table">
<thead>
<tr>
<th class="six wide">Name</th>
<th class="four wide">Roles</th>
<th class="six wide">Actions</th>
</tr>
</thead>
<tbody>
{{ $user := .User }}
{{ range .Users }}
<tr {{ if eq $user.ID .ID }}class="disabled"{{ end }}>
<td>{{ .Name }}</td>
<td>{{ .Roles | join ", " }}</td>
<td>
{{ if not (eq $user.ID .ID) }}
<a href="/users/{{ .ID }}/" class="ui labeled primary icon button"><i class="edit icon"></i> Edit</a>
{{ if .CanDelete }}
<a href="/users/{{ .ID }}/delete" class="ui labeled negative icon button" title="{{ .Name }} never participated in a motion and may be deleted">
<i class="delete icon"></i> Delete</a>
{{ end }}
{{ else }}
Cannot modify your own user. Ask another administrator or secretary.
{{ end }}
</td>
</tr>
{{ end }}
</tbody>
</table>
{{ else }}
<div class="ui basic segment">
<div class="ui icon message">
<i class="users icon"></i>
<div class="content">
<div class="header">No users found.</div>
</div>
</div>
</div>
{{ end }}
{{ end }}