QA page
This commit is contained in:
parent
dea71fc6b3
commit
11cd3236c5
13 changed files with 1952 additions and 71 deletions
|
@ -487,19 +487,25 @@ class DemoMainResource:
|
|||
const properties = feature.properties;
|
||||
|
||||
// Extraire les informations principales
|
||||
const title = properties.title || 'Événement sans titre';
|
||||
const title = properties.label || properties.title || 'Événement sans titre';
|
||||
const what = properties.what || 'Non spécifié';
|
||||
const when = properties.when ? formatDate(properties.when) : 'Date inconnue';
|
||||
const description = properties.description || 'Aucune description disponible';
|
||||
|
||||
// Créer le HTML de la popup
|
||||
// Créer le HTML de la popup avec titre cliquable pour édition
|
||||
const editLink = properties.id ? `/demo/edit/${properties.id}` : '#';
|
||||
|
||||
return `
|
||||
<div class="event-popup">
|
||||
<h3 style="margin-top: 0; color: #0078ff;">${title}</h3>
|
||||
<h3 style="margin-top: 0;">
|
||||
<a href="${editLink}" style="color: #0078ff; text-decoration: none;" title="Cliquer pour modifier cet événement">
|
||||
${title}
|
||||
</a>
|
||||
</h3>
|
||||
<p><strong>Type:</strong> ${what}</p>
|
||||
<p><strong>Date:</strong> ${when}</p>
|
||||
<p><strong>Description:</strong> ${description}</p>
|
||||
<p><a href="/demo/view/${properties.id}" style="color: #0078ff; font-weight: bold;">Voir détails</a></p>
|
||||
${properties.id ? `<p><a href="/demo/edit/${properties.id}" style="color: #0078ff; font-weight: bold;">✏️ Modifier l'événement</a></p>` : ''}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
@ -786,7 +792,9 @@ class DemoMainResource:
|
|||
|
||||
// Create popup content
|
||||
let popupContent = '<div class="event-popup">';
|
||||
popupContent += `<h3>${properties.label || 'Event'}</h3>`;
|
||||
const eventTitle = properties.label || 'Event';
|
||||
const editLink = properties.id ? `/demo/edit/${properties.id}` : '#';
|
||||
popupContent += `<h3><a href="${editLink}" style="color: #0078ff; text-decoration: none;" title="Cliquer pour modifier cet événement">${eventTitle}</a></h3>`;
|
||||
|
||||
// Display all properties
|
||||
popupContent += '<div style="max-height: 300px; overflow-y: auto;">';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue