guichet/templates/admin_mailing.html
2023-07-24 10:47:30 +02:00

55 lines
1.4 KiB
HTML

{{define "title"}}Mailing lists |{{end}}
{{define "admenu"}}
{{if .Login.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>
</ul>
</li>
{{end}}
{{if .Login}}
<li>&lt;&ngsp; <a href="#">Compte</a>
<ul class="submenu">
<a href="/logout">Se déconnecter</a>
<li><a href="/gpas">Mal de passe oublié</a></li>
<li><a href="/invite/new_account">S'enregistrer</a></li>
</ul></li>
{{else}}
<li> &lt;&ngsp;<a href="/">Se connecter</a></li>
{{end}}
{{end}}
{{define "body"}}
<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-4 btn btn-info" href="/">Menu principal</a>
</div>
<table class="table mt-4">
<thead>
<th scope="col">Adresse</th>
<th scope="col">Description</th>
</thead>
<tbody>
{{with $root := .}}
{{range $ml := $root.MailingLists}}
<tr>
<td>
<a href="/admin/mailing/{{$ml.GetAttributeValue $root.MailingNameAttr}}">
{{$ml.GetAttributeValue $root.MailingNameAttr}}
</a>
</td>
<td>{{$ml.GetAttributeValue "description"}}</td>
</tr>
{{end}}
{{end}}
</tbody>
</table>
{{end}}