Commit 81bbd28f authored by Bertille Dubosc de Pesquidoux's avatar Bertille Dubosc de Pesquidoux
Browse files

Correction de la recherche

parent dd55b5cf
......@@ -3,6 +3,7 @@
"name": "Remplissage Entraide",
"description": "Chaton qui a tous les services listés par entraide.chatons.org, afin de montrer comment l'export fonctionne",
"status": "non_verifie",
"structure": "autre",
"services": [{
"type": "doc_collaboratif",
"url": "https://example.org/pad",
......
......@@ -26,22 +26,40 @@ function displayChatons (chatons, section) {
info.setAttribute('class', 'chatonInfo');
chaton.appendChild(info);
populateDiv(info, 'Site web du Chaton', chatons[i].url);
populateDiv(info, 'Description', chatons[i].description);
populateDiv(info, 'Structure', chatons[i].structure);
populateDiv(info, 'Modèle économique', chatons[i].economic_model.join(', '));
populateDiv(info, "Public auquel s'adresse le Chaton", chatons[i].public.join(', '));
if (typeof chatons[i].url !== 'undefined') {
populateDiv(info, 'Site web du Chaton', chatons[i].url);
}
if (typeof chatons[i].description !== 'undefined') {
populateDiv(info, 'Description', chatons[i].description);
}
if (typeof chatons[i].structure !== 'undefined') {
populateDiv(info, 'Structure', chatons[i].structure);
}
if (typeof chatons[i].economic_model !== 'undefined') {
populateDiv(info, 'Modèle économique', chatons[i].economic_model.join(', '));
}
if (typeof chatons[i].public !== 'undefined') {
populateDiv(info, "Public auquel s'adresse le Chaton", chatons[i].public.join(', '));
}
const services = document.createElement('h4');
services.textContent = 'Liste des services proposés';
chaton.appendChild(services);
const servicesTable = document.createElement('table');
generateTable(servicesTable, chatons[i].services);
chaton.appendChild(servicesTable);
if (typeof chatons[i].services !== 'undefined') {
const services = document.createElement('h4');
services.textContent = 'Liste des services proposés';
chaton.appendChild(services);
const servicesTable = document.createElement('table');
generateTable(servicesTable, chatons[i].services);
chaton.appendChild(servicesTable);
}
populateDiv(info, 'Date de création', chatons[i].creation_date);
populateDiv(info, 'Adresse', chatons[i].address);
populateDiv(info, "Périmètre d'action", chatons[i].perimeter);
if (typeof chatons[i].creation_date !== 'undefined') {
populateDiv(info, 'Date de création', chatons[i].creation_date);
}
if (typeof chatons[i].address !== 'undefined') {
populateDiv(info, 'Adresse', chatons[i].address);
}
if (typeof chatons[i].perimeter !== 'undefined') {
populateDiv(info, "Périmètre d'action", chatons[i].perimeter);
}
section.appendChild(chaton);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment