feat: Protection des données des associations
This commit is contained in:
parent
5535a90e8d
commit
7f2fab4263
|
@ -10,9 +10,9 @@
|
|||
<div class="container md">
|
||||
<h2>Liens :</h2>
|
||||
<ul>
|
||||
{{ if .Params.mail }}<li>Mail : {{ .Params.mail }}</li>{{ end }}
|
||||
{{ if .Params.telephone }}<li>Téléphone : {{ .Params.telephone }}</li>{{ end }}
|
||||
{{ if .Params.site }}<li>Site WEB : {{ .Params.site }}</li>{{ end }}
|
||||
{{ if .Params.mail }}<li>Mail : {{ printf "[%s](mailto:%s)" .Params.mail .Params.mail | markdownify }}</li>{{ end }}
|
||||
{{ if .Params.telephone }}<li>Téléphone : {{ printf "[%s](tel:%s)" (replace .Params.telephone " " "") (replace .Params.telephone " " "") | markdownify }}</li>{{ end }}
|
||||
{{ if .Params.site }}<li>Site WEB : <a href="{{ .Params.site }}">{{ .Params.site }}</a></li>{{ end }}
|
||||
{{ if .Params.facebook }}<li>Facebook : {{ .Params.facebook }}</li>{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -34,23 +34,28 @@ const config = {
|
|||
if (!association.title) {
|
||||
association.title = association.denomination
|
||||
}
|
||||
const bureau = []
|
||||
for (const contact of association.bureau) {
|
||||
const detail = contact.Contact_id
|
||||
let c = {
|
||||
denomination: detail.denomination,
|
||||
prenom: detail.prenom,
|
||||
nom: detail.nom,
|
||||
if (association.bureau && association.bureau.length > 0) {
|
||||
console.log(association.bureau.length)
|
||||
const bureau = []
|
||||
for (const contact of association.bureau) {
|
||||
const detail = contact.Contact_id
|
||||
let c = {
|
||||
denomination: detail.denomination,
|
||||
prenom: detail.prenom,
|
||||
nom: detail.nom,
|
||||
}
|
||||
if (detail.mail && detail.display_mail) {
|
||||
c.mail = detail.mail
|
||||
}
|
||||
if (detail.telephone && detail.display_telephone) {
|
||||
c.telephone = detail.telephone
|
||||
}
|
||||
bureau.push(c)
|
||||
}
|
||||
if (detail.mail && detail.display_mail) {
|
||||
c.mail = detail.mail
|
||||
}
|
||||
if (detail.telephone && detail.display_telephone) {
|
||||
c.telephone = detail.telephone
|
||||
}
|
||||
bureau.push(c)
|
||||
association.bureau = bureau
|
||||
} else {
|
||||
delete association.bureau
|
||||
}
|
||||
association.bureau = bureau
|
||||
|
||||
return `./content/associations/${urlslug(association.denomination)}`;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue