Refactoring
This commit is contained in:
parent
d4900b3501
commit
f585c02d2c
11 changed files with 36 additions and 36 deletions
|
@ -87,7 +87,7 @@ func makeGVRouter() (*mux.Router, error) {
|
|||
|
||||
r.HandleFunc("/admin-users", handleAdminUsers)
|
||||
r.HandleFunc("/admin-groups", handleAdminGroups)
|
||||
r.HandleFunc("/admin-mailing", handleAdminMailing)
|
||||
// r.HandleFunc("/admin-mailing", handleAdminMailing)
|
||||
// r.HandleFunc("/admin/mailing/{id}", handleAdminMailingList)
|
||||
r.HandleFunc("/admin-ldap/{dn}", handleAdminLDAP)
|
||||
r.HandleFunc("/admin-create/{template}/{super_dn}", handleAdminCreate)
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
{{range $user := $root.Users}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/activate/{{ $user.GetAttributeValue "cn" }}">
|
||||
<a href="/admin-activate/{{ $user.GetAttributeValue "cn" }}">
|
||||
Activer
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/ldap/{{$user.DN}}">{{$user.GetAttributeValue "cn"}}</a>
|
||||
<a href="/admin-ldap/{{$user.DN}}">{{$user.GetAttributeValue "cn"}}</a>
|
||||
</td>
|
||||
<td>{{$user.GetAttributeValue "mail"}}</td>
|
||||
<td>{{$user.GetAttributeValue "displayName"}}</td>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
{{range .Path}}
|
||||
<li class="breadcrumb-item"><a href="/admin/ldap/{{.DN}}">{{.Identifier}}</a></li>
|
||||
<li class="breadcrumb-item"><a href="/admin-ldap/{{.DN}}">{{.Identifier}}</a></li>
|
||||
{{end}}
|
||||
<li class="breadcrumb-item active" aria-current="page">Nouvel objet</li>
|
||||
</ol>
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
|
||||
<div class="d-flex">
|
||||
<h2>Liste des groupes</h2>
|
||||
<a class="ml-auto btn btn-success" href="/admin/create/group/{{.GroupBaseDN}}">Nouveau groupe</a>
|
||||
<a class="ml-auto btn btn-success" href="/admin-create/group/{{.GroupBaseDN}}">Nouveau groupe</a>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning mt-4">
|
||||
Les groupes servent uniquement à contrôler l'accès à différentes fonctionalités de Deuxfleurs.
|
||||
Ce ne sont pas des <a href="/admin/mailing">mailing lists</a>.
|
||||
Ce ne sont pas des <a href="/admin-mailing">mailing lists</a>.
|
||||
</div>
|
||||
|
||||
<table class="table mt-4">
|
||||
|
@ -26,7 +26,7 @@
|
|||
{{range $group := $root.Groups}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/ldap/{{$group.DN}}">
|
||||
<a href="/admin-ldap/{{$group.DN}}">
|
||||
{{$group.GetAttributeValue $root.GroupNameAttr}}
|
||||
</a>
|
||||
</td>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{{if .Active}}
|
||||
<li class="breadcrumb-item active" aria-current="page">{{.Identifier}}</li>
|
||||
{{else}}
|
||||
<li class="breadcrumb-item"><a href="/admin/ldap/{{.DN}}">{{.Identifier}}</a></li>
|
||||
<li class="breadcrumb-item"><a href="/admin-ldap/{{.DN}}">{{.Identifier}}</a></li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</ol>
|
||||
|
@ -29,7 +29,7 @@
|
|||
{{range .ChildrenOU}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/ldap/{{.DN}}">
|
||||
<a href="/admin-ldap/{{.DN}}">
|
||||
🗀 {{.Identifier}}
|
||||
</a>
|
||||
</td>
|
||||
|
@ -39,7 +39,7 @@
|
|||
{{range .ChildrenOther}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/ldap/{{.DN}}">
|
||||
<a href="/admin-ldap/{{.DN}}">
|
||||
{{.Identifier}}
|
||||
</a>
|
||||
</td>
|
||||
|
@ -51,10 +51,10 @@
|
|||
|
||||
{{if .CanAddChild}}
|
||||
<div class="mt-2">
|
||||
<a class="btn btn-sm btn-success" href="/admin/create/user/{{.DN}}">+utilisateur</a>
|
||||
<a class="ml-4 btn btn-sm btn-success" href="/admin/create/group/{{.DN}}">+groupe</a>
|
||||
<a class="ml-4 btn btn-sm btn-success" href="/admin/create/ou/{{.DN}}">+ou</a>
|
||||
<a class="ml-4 btn btn-sm btn-success" href="/admin/create/generic/{{.DN}}">+objet</a>
|
||||
<a class="btn btn-sm btn-success" href="/admin-create/user/{{.DN}}">+utilisateur</a>
|
||||
<a class="ml-4 btn btn-sm btn-success" href="/admin-create/group/{{.DN}}">+groupe</a>
|
||||
<a class="ml-4 btn btn-sm btn-success" href="/admin-create/ou/{{.DN}}">+ou</a>
|
||||
<a class="ml-4 btn btn-sm btn-success" href="/admin-create/generic/{{.DN}}">+objet</a>
|
||||
</div>
|
||||
<hr class="mt-4" />
|
||||
{{end}}
|
||||
|
@ -108,7 +108,7 @@
|
|||
<div class="col-md-9">
|
||||
{{range $value.Values}}
|
||||
{{if eq $key "creatorsname" "modifiersname" }}
|
||||
<div><a href="/admin/ldap/{{.}}">{{.}}</a></div>
|
||||
<div><a href="/admin-ldap/{{.}}">{{.}}</a></div>
|
||||
{{else}}
|
||||
<div>{{.}}</div>
|
||||
{{end}}
|
||||
|
@ -145,7 +145,7 @@
|
|||
<strong>{{.Name}}</strong>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<a href="/admin/ldap/{{.DN}}">{{.DN}}</a>
|
||||
<a href="/admin-ldap/{{.DN}}">{{.DN}}</a>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<form method="POST" onsubmit="return confirm('Supprimer du groupe ?');">
|
||||
|
@ -187,7 +187,7 @@
|
|||
<strong>{{.Name}}</strong>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<a href="/admin/ldap/{{.DN}}">{{.DN}}</a>
|
||||
<a href="/admin-ldap/{{.DN}}">{{.DN}}</a>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<form method="POST" onsubmit="return confirm('Supprimer du groupe ?');">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<div class="d-flex">
|
||||
<h4>Mailing lists</h4>
|
||||
<a class="ml-auto btn btn-success" href="/admin/create/ml/{{.MailingBaseDN}}">Nouvelle mailing list</a>
|
||||
<a class="ml-auto btn btn-success" href="/admin-create/ml/{{.MailingBaseDN}}">Nouvelle mailing list</a>
|
||||
<a class="ml-4 btn btn-info" href="/">Menu principal</a>
|
||||
</div>
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
|||
{{range $ml := $root.MailingLists}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/mailing/{{$ml.GetAttributeValue $root.MailingNameAttr}}">
|
||||
<a href="/admin-mailing/{{$ml.GetAttributeValue $root.MailingNameAttr}}">
|
||||
{{$ml.GetAttributeValue $root.MailingNameAttr}}
|
||||
</a>
|
||||
</td>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
<div class="d-flex">
|
||||
<h2>ML {{.MailingList.GetAttributeValue .MailingNameAttr}}
|
||||
<a class="ml-auto btn btn-sm btn-dark" href="/admin/ldap/{{.MailingList.DN}}">Vue avancée</a>
|
||||
<a class="ml-auto btn btn-sm btn-dark" href="/admin-ldap/{{.MailingList.DN}}">Vue avancée</a>
|
||||
</h2>
|
||||
<a class="ml-auto btn btn-dark" href="/admin/mailing">Liste des ML</a>
|
||||
<a class="ml-auto btn btn-dark" href="/admin-mailing">Liste des ML</a>
|
||||
</div>
|
||||
|
||||
{{if .Common.Success}}
|
||||
|
@ -35,7 +35,7 @@
|
|||
{{range $member := $root.Members}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/ldap/{{$member.DN}}">
|
||||
<a href="/admin-ldap/{{$member.DN}}">
|
||||
{{$member.GetAttributeValue "mail"}}
|
||||
</a>
|
||||
</td>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="d-flex">
|
||||
<h2>Liste des utilisateurs</h2>
|
||||
<a class="ml-auto btn btn-success" href="/admin/create/user/{{.UserBaseDN}}">Nouvel utilisateur</a>
|
||||
<a class="ml-auto btn btn-success" href="/admin-create/user/{{.UserBaseDN}}">Nouvel utilisateur</a>
|
||||
</div>
|
||||
|
||||
<table class="table mt-4">
|
||||
|
@ -23,12 +23,12 @@
|
|||
{{range $user := $root.Users}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/unactivate/{{ $user.GetAttributeValue "cn" }}">
|
||||
<a href="/admin-unactivate/{{ $user.GetAttributeValue "cn" }}">
|
||||
Dèsactiver
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/admin/ldap/{{$user.DN}}">
|
||||
<a href="/admin-ldap/{{$user.DN}}">
|
||||
{{$user.GetAttributeValue $root.UserNameAttr}}
|
||||
</a>
|
||||
</td>
|
||||
|
|
|
@ -55,11 +55,11 @@
|
|||
Administration
|
||||
</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action" href="/admin/activate">Activer des Utilisateur·ices</a>
|
||||
<a class="list-group-item list-group-item-action" href="/admin/users">Utilisateur·ices</a>
|
||||
<a class="list-group-item list-group-item-action" href="/admin/groups">Groupes</a>
|
||||
<a class="list-group-item list-group-item-action" href="/admin/mailing">Mailing lists</a>
|
||||
<a class="list-group-item list-group-item-action" href="/admin/ldap/{{.BaseDN}}">Explorateur LDAP</a>
|
||||
<a class="list-group-item list-group-item-action" href="/admin-activate">Activer des Utilisateur·ices</a>
|
||||
<a class="list-group-item list-group-item-action" href="/admin-users">Utilisateur·ices</a>
|
||||
<a class="list-group-item list-group-item-action" href="/admin-groups">Groupes</a>
|
||||
<a class="list-group-item list-group-item-action" href="/admin-mailing">Mailing lists</a>
|
||||
<a class="list-group-item list-group-item-action" href="/admin-ldap/{{.BaseDN}}">Explorateur LDAP</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -58,10 +58,10 @@
|
|||
{{if .Common.CanAdmin}}
|
||||
<li>< <a href="#">Administration</a>
|
||||
<ul class="submenu">
|
||||
<!-- <li><a href="/admin/activate">Administrer LDAP</a> -->
|
||||
<li><a href="/admin/activate">Activer des Utilisateur·ices</a></li>
|
||||
<li><a href="/admin/users">Utilisateur·ices</a></li>
|
||||
<!-- <li><a href="/admin/groups">Groupes</a></li> -->
|
||||
<!-- <li><a href="/admin-activate">Administrer LDAP</a> -->
|
||||
<li><a href="/admin-activate">Activer des Utilisateur·ices</a></li>
|
||||
<li><a href="/admin-users">Utilisateur·ices</a></li>
|
||||
<!-- <li><a href="/admin-groups">Groupes</a></li> -->
|
||||
</ul>
|
||||
</li>
|
||||
{{end}}
|
||||
|
@ -75,7 +75,7 @@
|
|||
{{else}}
|
||||
<li><a href="/">Se connecter</a></li>
|
||||
<li><a href="/gpas">Mal de passe oublié</a></li>
|
||||
<li><a href="/invite/new_account">S'enregistrer</a></li>
|
||||
<li><a href="/inscription">S'enregistrer</a></li>
|
||||
{{end}}
|
||||
</ul></li>
|
||||
<li> < <a href="#" class="jour-nuit" id="jour-nuit">Jour et nuit</a></li>
|
||||
|
|
|
@ -35,6 +35,6 @@
|
|||
|
||||
<p><strong><a href="/gpas">Mot de passe perdu</a></strong></p>
|
||||
|
||||
<p><strong><a href="/invite/new_account">S'enregistrer</a></strong></p>
|
||||
<p><strong><a href="/inscription">S'enregistrer</a></strong></p>
|
||||
|
||||
{{end}}
|
||||
|
|
Loading…
Reference in a new issue