Affichage optionnel des images dans les popups
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 27 Feb 2012 14:48:54 +0000 (15:48 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 27 Feb 2012 14:48:54 +0000 (15:48 +0100)
contenu/page-carte_de_sites.html

index 01b55dc..80a6c0b 100755 (executable)
@@ -10,6 +10,8 @@
     - haut  = 400   : hauteur
     - style = 14189 : style de carte. Voir http://maps.cloudmade.com/editor
     - boite = oui   : affiche la boite avec calques et types
+    - popup = oui   : autoriser les popups
+    - images = oui  : afficher les images
 ]
 
 <!-- Carte -->
                                                });
                                                siteIcon = new WorkshopIcon()
                                                var markerAtelier = new L.Marker(new L.LatLng(#LAT, #LON), {icon: siteIcon});
-                                               markerAtelier.bindPopup("\
-                                                       <span style='float: left; width: 45px;'><img src='[(#LOGO_SYNDIC||extraire_attribut{src}|url_absolue)]' alt='' style='width: 45px;' width='45'></span>\
-                                                       <a href='[(#ID_SYNDIC|generer_url_entite{site})]'>#TITRE</a><br/>#DESCRIPTIF\
-                                                       <span class='spip_documents spip_documents_right' style='float: right; width: 100px;'>\<img src='[(#LOGO_SYNDIC_SURVOL||extraire_attribut{src}|url_absolue)]' alt='' style='width: 100px;' width='100'></span>\
-                                                       #ADRESSE<br/> #CODE_POSTAL #VILLE<br/>\
-                                                       <a href='#URL_SITE'>#NOM_SITE - #URL_SITE</a><br/><br/>\
-                                                       <em>Statut: [(#_ateliers_types:TITRE|supprimer_numero)]</em>\
-                                               ");
+                        [(#ENV{popup}|!={non}|oui)
+                                               markerAtelier.bindPopup("[(#ENV{images}|!={non}|oui)<span style='float: left; width: 45px;'><img src='[(#LOGO_SYNDIC||extraire_attribut{src}|url_absolue)]' alt='' style='width: 45px;' width='45'></span>]<a href='[(#ID_SYNDIC|generer_url_entite{site})]'>#TITRE</a><br/>#DESCRIPTIF[(#ENV{images}|!={non}|oui)<span class='spip_documents spip_documents_right' style='float: right; width: 100px;'>\<img src='[(#LOGO_SYNDIC_SURVOL||extraire_attribut{src}|url_absolue)]' alt='' style='width: 100px;' width='100'></span>]#ADRESSE<br/> #CODE_POSTAL #VILLE<br/><a href='#URL_SITE'>#NOM_SITE - #URL_SITE</a><br/><br/><em>Statut: [(#_ateliers_types:TITRE|supprimer_numero)]</em>");
+                                               ]
                                                group_#ID_MOT.addLayer(markerAtelier)
                                </BOUCLE_coord>
                </BOUCLE_sites>