{# si l'utilisateur est loggué #}
{% if app.user is not null %}
{% set monR = 0 %}
{# recupere ses ROLES #}
{% for role in app.user.roles %}
{% if role == "ROLE_ADMIN" %}
{% set monR = monR + 3 %}
{% else %}
{% set monR = monR + 1 %}
{% endif %}
{% endfor %}
{# sinon c'est un simple visiteur #}
{% else %}
{% set monR = 0 %}
{% endif %}
{% if monR > 0 %}
<!-- navH -->
{% if stack.navH is defined and stack.navH is not null %}
<a href="{{ path("webSite_stacks_show", { "id" : stack.navH, 'recherche': recherche}) }}">
<div id="navH{{ stack.navH }}" class="navH zoneActive text-center" style="opacity:0.8; background-color:red; height:20px;position:absolute; top:0; width:70%; left:15%;">
{{ stack.navH }}
</div>
</a>
{% endif %}
<!-- navG -->
{% if stack.navG is defined and stack.navG is not null %}
<a href="{{ path("webSite_stacks_show", { "id" : stack.navG, 'recherche': recherche }) }}">
<div id="navG{{ stack.navG }}" class="navG zoneActive" style="opacity:0.8; background-color:green; width:20px; position: absolute; top:20%; height:60%;">
{{ stack.navG }}
</div>
</a>
{% endif %}
<!-- navD -->
{% if stack.navD is defined and stack.navD is not null %}
<a href="{{ path("webSite_stacks_show", { "id" : stack.navD, 'recherche': recherche }) }}">
<div id="navD{{ stack.navD }}" class="navD zoneActive" style="opacity:0.8; background-color:yellow; width:20px; position: absolute; top:20%; height:60%; right:0;">
{{ stack.navD }}
</div>
</a>
{% endif %}
<!-- navBG -->
{% if stack.navBG is defined and stack.navBG is not null %}
<a href="{{ path("webSite_stacks_show", { "id" : stack.navBG, 'recherche': recherche }) }}">
<div id="navBG{{ stack.navD }}" class="navBG zoneActive" style="opacity:0.8; background-color:orange; height:20px; position: absolute; bottom:0; width:25%; left:15%;">
{{ stack.navBG }}
</div>
</a>
{% endif %}
<!-- navBD -->
{% if stack.navBD is defined and stack.navBD is not null %}
<a href="{{ path("webSite_stacks_show", { "id" : stack.navBD, 'recherche': recherche }) }}">
<div id="navBD{{ stack.navD }}" class="navBD zoneActive" style="opacity:0.8; background-color:lightgreen; height:20px; position: absolute; bottom:0; width:25%; right:15%;">
{{ stack.navBD }}
</div>
</a>
{% endif %}
<!-- xxxx -->
{% if stack.zones is defined and stack.zones is not null and stack.zones is not empty %}
{% for zone in stack.zones %}
{% if zone.destination is defined and zone.destination is not null and zone.destination != 0 %}
<a href="{{ path("webSite_stacks_show", { "id" : zone.destination, 'recherche': recherche }) }}">
{% else %}
<a href="{{ path("webSite_stacks_show", { "id" : zone.rollover, 'recherche': recherche }) }}">
{% endif %}
<div class="zoneAdd zoneActive" id="zone{{ zone.id }}"
style="
position:absolute;
background-color: pink;
opacity:0.6;
left: {{ (zone.x / 900) * 100 }}%;
top: {{ (zone.y / 675) * 100 }}%;
width: {{ (zone.largeur / 900) * 100 }}%;
height: {{ (zone.hauteur / 675) * 100 }}%;
"
>
{% if zone.destination is defined and zone.destination is not null and zone.destination != 0 %}
{{ zone.destination }}
{% else %}
{{ zone.rollover }}
{% endif %}
</div>
</a>
{% endfor %}
{% endif %}
{% endif %}