2023-02-08 12:11:43 +00:00
|
|
|
{{define "title"}}ML {{.MailingList.GetAttributeValue .MailingNameAttr}} |{{end}}
|
2023-07-23 15:18:29 +00:00
|
|
|
{{define "admenu"}}
|
|
|
|
{{end}}
|
2023-02-08 12:11:43 +00:00
|
|
|
{{define "body"}}
|
|
|
|
|
|
|
|
<div class="d-flex">
|
2023-07-21 14:18:40 +00:00
|
|
|
<h2>ML {{.MailingList.GetAttributeValue .MailingNameAttr}}
|
2023-02-08 12:11:43 +00:00
|
|
|
<a class="ml-auto btn btn-sm btn-dark" href="/admin/ldap/{{.MailingList.DN}}">Vue avancée</a>
|
2023-07-21 14:18:40 +00:00
|
|
|
</h2>
|
2023-02-08 12:11:43 +00:00
|
|
|
<a class="ml-auto btn btn-dark" href="/admin/mailing">Liste des ML</a>
|
|
|
|
</div>
|
|
|
|
|
2023-07-25 19:35:22 +00:00
|
|
|
{{if .Common.Success}}
|
2023-02-08 12:11:43 +00:00
|
|
|
<div class="alert alert-success mt-2">Modification enregistrée.</div>
|
|
|
|
{{end}}
|
2023-07-25 19:35:22 +00:00
|
|
|
{{if .Common.Error}}
|
2023-02-08 12:11:43 +00:00
|
|
|
<div class="alert alert-danger mt-2">
|
|
|
|
Impossible d'effectuer la modification.
|
|
|
|
<div style="font-size: 0.8em">{{.Error}}</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2023-02-08 15:46:13 +00:00
|
|
|
{{with $desc := .MailingList.GetAttributeValue "description"}}{{if $desc}}
|
|
|
|
<p class="mt-4">{{$desc}}</p>
|
|
|
|
{{end}}{{end}}
|
|
|
|
|
2023-02-08 12:11:43 +00:00
|
|
|
<table class="table mt-4">
|
|
|
|
<thead>
|
|
|
|
<th scope="col">Adresse</th>
|
|
|
|
<th scope="col">Nom</th>
|
|
|
|
<th scope="col" style="width: 6em"></th>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{with $root := .}}
|
|
|
|
{{range $member := $root.Members}}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="/admin/ldap/{{$member.DN}}">
|
|
|
|
{{$member.GetAttributeValue "mail"}}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>{{$member.GetAttributeValue "displayname"}}</td>
|
|
|
|
<td>
|
|
|
|
<form method="POST" onsubmit="return confirm('Supprimer de la ML ?');">
|
|
|
|
<input type="hidden" name="action" value="delete-member" />
|
|
|
|
<input type="hidden" name="member" value="{{.DN}}" />
|
|
|
|
<input type="submit" value="Suppr" class="form-control btn btn-danger btn-sm" />
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2023-02-08 15:46:13 +00:00
|
|
|
{{if not .Members}}
|
|
|
|
<tr><td>(aucun abonné)</td></tr>
|
|
|
|
{{end}}
|
2023-02-08 12:11:43 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2023-02-08 15:46:13 +00:00
|
|
|
<hr class="mt-4" />
|
|
|
|
<h5 class="mt-4">Ajouter un destinataire</h5>
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="action" value="add-member" />
|
|
|
|
<div class="row mt-4">
|
|
|
|
<div class="col-md-3"><strong>Utilisateur existant :</strong> </div>
|
2023-02-08 12:11:43 +00:00
|
|
|
<div class="col-md-5">
|
|
|
|
<input class="form-control" type="text" list="users" name="member" placeholder="Utilisateur..." />
|
|
|
|
<datalist id="users">
|
|
|
|
{{range .PossibleNewMembers}}
|
|
|
|
{{if .GetAttributeValue "mail"}}
|
|
|
|
<option value="{{.DN}}">{{if .GetAttributeValue "displayname"}}{{.GetAttributeValue "displayname"}} ({{.GetAttributeValue "mail" }}){{else}}{{.GetAttributeValue "mail"}}{{end}}</option>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</datalist>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
2023-02-08 15:46:13 +00:00
|
|
|
<input type="submit" value="Ajouter" class="form-control btn btn-success btn-sm" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{{if .AllowGuest}}
|
|
|
|
<div class="row mt-4">
|
|
|
|
<div class="col-md-10">OU</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="action" value="add-external" />
|
|
|
|
<div class="row mt-4">
|
|
|
|
<div class="col-md-3"><strong>E-mail :</strong></div>
|
|
|
|
<div class="col-md-5">
|
|
|
|
<input class="form-control" type="text" name="mail" placeholder="machin@truc.net..." />
|
2023-02-08 12:11:43 +00:00
|
|
|
</div>
|
2023-02-08 15:46:13 +00:00
|
|
|
<div class="col-md-2">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row mt-4">
|
|
|
|
<div class="col-md-3"><strong>Nom (optionnel) :</strong></div>
|
|
|
|
<div class="col-md-5">
|
|
|
|
<input class="form-control" type="text" name="displayname" placeholder="Machin Truc..." />
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
|
|
|
<input type="submit" value="Ajouter" class="form-control btn btn-success btn-sm" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<small class="form-text text-muted col-md-10">
|
|
|
|
Si un utilisateur existe déjà avec l'email spécifiée, celui-ci sera ajouté à la liste.
|
|
|
|
Sinon, un utilisateur invité sera créé.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
2023-02-08 12:11:43 +00:00
|
|
|
{{end}}
|