Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bertille Pesquidoux
TX-collecte-CHATONS
Commits
81bbd28f
Commit
81bbd28f
authored
Jun 10, 2020
by
Bertille Dubosc de Pesquidoux
Browse files
Correction de la recherche
parent
dd55b5cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
site/fiches/exemple-services-entraide.json
View file @
81bbd28f
...
...
@@ -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"
,
...
...
site/search/chatons_display.js
View file @
81bbd28f
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment