Map: organization popup links and backend page selector
This commit is contained in:
@@ -438,6 +438,20 @@ const popupHtmlFor = (item) => {
|
||||
].join('');
|
||||
}
|
||||
|
||||
if (item.type === 'organisation') {
|
||||
const title = sanitizeDisplayText(item.title || '');
|
||||
const detailUrl = String(item.extra?.detailUrl || '').trim();
|
||||
const hasDetailUrl = /^(https?:\/\/|\/)/i.test(detailUrl);
|
||||
const detailLink = hasDetailUrl
|
||||
? `<div><a href="${escapeHtml(detailUrl)}">mehr Infos</a></div>`
|
||||
: '';
|
||||
|
||||
return [
|
||||
`<strong>${title}</strong>`,
|
||||
detailLink,
|
||||
].join('');
|
||||
}
|
||||
|
||||
return `<strong>${sanitizeDisplayText(item.title)}</strong>`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user