Skip to content
Snippets Groups Projects
Commit ecb14216 authored by Hadrien Froger's avatar Hadrien Froger
Browse files

Fix/demos

parent 0a804edc
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,12 @@ import _ from "lodash";
const proposals = (node) => {
const { i18n, images, locale, defaultLocale } = configStore.getState();
const hasImage = !_.isEmpty(node.imageUrl);
const states = i18n["decidim.geo.proposals.states"]
const listCard = L.DomUtil.create("li", "decidimGeo__drawer__listCard");
const listCard = L.DomUtil.create("li", "decidimGeo__drawer__listCard decidimGeo__drawer__listCard--proposals");
const info = L.DomUtil.create(
"div",
"decidimGeo__drawer__listCardInfo decidimGeo__drawer__listCardInfo--large",
"decidimGeo__drawer__listCardInfo",
listCard
);
const metadatas = L.DomUtil.create("div", "decidimGeo__drawer__metas", info);
......@@ -38,12 +39,15 @@ const proposals = (node) => {
if (node.shortDescription) {
const infoDescription = L.DomUtil.create(
"div",
"decidimGeo__drawer__listCardDescription",
info
);
infoDescription.textContent =
node.shortDescription[locale] || node.shortDescription[defaultLocale];
}
if (hasImage) {
const image = L.DomUtil.create("img", "decidimGeo__drawer__listCardImg", listCard);
image.src = node.imageUrl;
}
return listCard;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment