1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
| {* Image - maps *}
{def $idf_area = fetch('content','list',hash('parent_node_id',246,
'sort_by', $french_area.sort_array,
'class_filter_array', array('regions')))
}
{$idf_area_count = $idf_area|count()}
<div class="class_map">
<img src={'cartes/idf.jpg'| ezimage} alt="Carte d'Ile de France" />
{* Cette div ne s'affiche que pour le zoom sur la région parisienne *}
<div id="carte_paris_cart" class="carte_paris" style="display: none;">
<a href="#">
<div id="closer" onClick="javascript:clickIt('carte_paris');return false;">
</div>
</a>
</div>
<div id="paris" onClick="javascript:clickIt('carte_paris');return false;"><a href="#"></a></div>
{foreach $idf_area as $key => $item}
{def $site = fetch( 'content', 'list', hash( 'parent_node_id', $item.node_id,
'sort_by', $subitem.sort_array,
'class_filter_type', 'include',
'class_filter_array', array('site_gis'),
'depth', '2') )
}
{def $this_surface = 0}
{foreach $site as $this_site}
{def $this_id = concat('site_',$this_site.node_id)}
{def $this_img_id = concat('img_site_',$this_site.node_id)}
{def $this_text_id = concat('txt_site_',$this_site.node_id)}
{* calcul des tailles des sites sur la carte *}
{if eq($item.node_id,247) }
{def $this_taille = 10}
{if $this_site.data_map.surface_totale.value | gt(20000) }
{def $this_taille_p = 30}
{else}
{if $this_site.data_map.surface_totale.value | lt(5000)}
{def $this_taille_p = 15}
{else}
{def $this_taille_p = sum(round(mul($this_site.data_map.surface_totale.value,0.001)),15) }
{/if}
{/if}
{else}
{if $this_site.data_map.surface_totale.value | gt(20000) }
{def $this_taille = 30}
{else}
{if $this_site.data_map.surface_totale.value | lt(5000)}
{def $this_taille = 7}
{else}
{def $this_taille = sum(round(mul($this_site.data_map.surface_totale.value,0.0015)),7) }
{/if}
{/if}
{/if}
{* Calcul de la position en fonction des longitude et latitudes données par GIS *}
{def $this_top = sub(abs(round(mul(div(sub(49.29, $this_site.data_map.gis.content.latitude),1.2052),491))), div($this_taille,2))}
{def $this_left = sub(abs(round(mul(div(sub(1.34, $this_site.data_map.gis.content.longitude),2.40465),640))), div($this_taille,2))}
{* calcul de la position pour le zoom de la carte de Paris *}
{def $this_top_p = sum(round(sub(abs(round(mul(div(sub(48.96, $this_site.data_map.gis.content.latitude),0.18),350))), div($this_taille_p,2))),75)}
{def $this_left_p = sum(round(sub(abs(round(mul(div(sub(2.128, $this_site.data_map.gis.content.longitude),0.3683),450))), div($this_taille_p,2))),100)}
{* Calcul du z-index en fonction de la taille des sites pour éviter qu'un petit site ne soit recouvert par un plus grand *}
{def $this_zindex = sum(round(mul(div(1,$this_taille),1000)),round(mul(div(1,$this_top),10000)))}
{def $this_zindex_p = sum($this_zindex,1000)}
{set $this_surface = $this_site.data_map.surface_dispo.value}
{if $this_surface | gt(0)}
{*def $this_class = 'dispo'*}
<div id="{$this_id}" style="z-index: {$this_zindex}; top: {$this_top}px; left: {$this_left}px;" class="dispo">
<a href={$this_site.url_alias | ezurl()}>
<img src={'cartes/point_site_vert.png'| ezimage} alt="{$this_site.name | wash()}" width="{$this_taille}" height="{$this_taille}" />
<div class="cadre" style="left: {round(div($this_taille,2))}px;">
<div class="cadre_g"></div>
<div class="cadre_c">
<p>{$this_site.name | upcase() | wash()}</p>
</div>
<div class="cadre_d"></div>
</div>
</a>
</div>
{if eq($item.node_id,247) }
<div class="carte_paris" style="z-index: {$this_zindex_p}; top: {$this_top_p}px; left: {$this_left_p}px; width: {$this_taille_p}px; height:{$this_taille_p}px; display: none;">
<div id="{$this_id}_p" class="dispo" >
<a href={$this_site.url_alias | ezurl()}>
<img src={'cartes/point_site_vert.png'| ezimage} alt="{$this_site.name | wash()}" width="{$this_taille_p}" height="{$this_taille_p}" />
<div class="cadre" style="left: {round(div($this_taille_p,2))}px;">
<div class="cadre_g"></div>
<div class="cadre_c">
<p>{$this_site.name | upcase() | wash()}</p>
</div>
<div class="cadre_d"></div>
</div>
</a>
</div>
</div>
{/if}
{else}
{*def $this_class = 'nodispo'*}
<div id="{$this_id}" style="z-index: {$this_zindex}; top: {$this_top}px; left: {$this_left}px;" class="nodispo">
<a href={$this_site.url_alias | ezurl()}>
<img src={'cartes/point_site_violet.png'| ezimage} alt="{$this_site.name | wash()}" width="{$this_taille}" height="{$this_taille}" />
<div class="cadre" style="left: {round(div($this_taille,2))}px;">
<div class="cadre_g"></div>
<div class="cadre_c">
<p>{$this_site.name | upcase() | wash()}</p>
</div>
<div class="cadre_d"></div>
</div>
</a>
</div>
{if eq($item.node_id,247) }
<div class="carte_paris" style="z-index: {$this_zindex_p}; top: {$this_top_p}px; left: {$this_left_p}px; width: {$this_taille_p}px; height:{$this_taille_p}px; display: none; ">
<div id="{$this_id}_p" class="nodispo" >
<a href={$this_site.url_alias | ezurl()}>
<img src={'cartes/point_site_violet.png'| ezimage} alt="{$this_site.name | wash()}" width="{$this_taille_p}" height="{$this_taille_p}" />
<div class="cadre" style="left: {round(div($this_taille_p,2))}px;">
<div class="cadre_g"></div>
<div class="cadre_c">
<p>{$this_site.name | upcase() | wash()}</p>
</div>
<div class="cadre_d"></div>
</div>
</a>
</div>
</div>
{/if}
{/if}
{/foreach}
{/foreach}
<div id="check_dispo"><input type="checkbox" id="checkbox_1" onclick="switch_visibility('checkbox_1','nodispo')" checked="checked" />
{if $current_locale.locale_code|eq('fre-FR')}
Patrimoine total (décochez pour voir uniquement la disponibilité)
{elseif $current_locale.locale_code|eq('eng-GB')}
Total inheritance (uncheck to see only the availability)
{else}
Patrimoine total (décochez pour voir uniquement la disponibilité)
{/if}
</div>
</div> |
Partager