guichet/templates/admin_users.html
2020-02-10 09:44:18 +01:00

34 lines
872 B
HTML

{{define "title"}}Liste des utilisateurs |{{end}}
{{define "body"}}
<div class="d-flex">
<h4>Liste des utilisateurs</h4>
<a class="ml-auto btn btn-success" href="/admin/create/user/{{.UserBaseDN}}">Nouvel utilisateur</a>
<a class="ml-4 btn btn-info" href="/">Menu principal</a>
</div>
<table class="table mt-4">
<thead>
<th scope="col">Identifiant</th>
<th scope="col">Nom complet</th>
<th scope="col">Email</th>
</thead>
<tbody>
{{with $root := .}}
{{range $user := $root.Users}}
<tr>
<td>
<a href="/admin/ldap/{{$user.DN}}">
{{$user.GetAttributeValue $root.UserNameAttr}}
</a>
</td>
<td>{{$user.GetAttributeValue "displayname"}}</td>
<td>{{$user.GetAttributeValue "mail"}}</td>
</tr>
{{end}}
{{end}}
</tbody>
</table>
{{end}}