{% set route=app.request.attributes.get("_route") %}
<ul class='internal_links'>
{% set work_label="" %}
{# dump(app.request.requestUri) => "uma/pub/work/mpro/app_dev.php/" #}
{# if "/work/" in app.request.requestUri : FONCTIONE AUSSI #}
{# ATTENTION il faut doubler les backslash dans les regexp twig (1.x) ! #}
{% if app.request.requestUri matches '/^.*\\/work\\/.*$/' %}
{% set work_label = " <span class='stabilo'>(DEV "~app_version_dev~")</span>" %}
{% endif %}
{% set class=(route=="homepage" ? "current": "") %}
<li class="{{class}}">
<a href="{{ path('homepage') }}"
>Accueil Geopos {{ work_label|raw }}</a>
</li>
{#
{% set class=(route=="mpro_default_master2_OLD_KEEP" ? "current": "") %}
<li class="{{class}}">
<a href="{{ path('mpro_default_master2_OLD_KEEP') }}">Master 2 OLD_KEEP</a>
</li>
#}
<div style='height: 0.0em;'></div>
{% set class=(route=="app_main_randos" ? "current": "") %}
<li class="{{class}}">
<a href="{{ path('app_main_randos') }}">app_main_randos</a>
</li>
<div style='height: 0.0em;'></div>
{% set class=(route=="app_main_randos_old" ? "current": "") %}
<li class="{{class}}">
<a href="{{ path('app_main_randos_old') }}">app_main_randos_old</a>
</li>
<div style='height: 1.0em;'></div>
{% set class=(route=="app_main_show_gpx" ? "current": "") %}
<li class="{{class}}">
<a href="{{ path('app_main_show_gpx') }}">app_main_show_gpx</a>
<a href="{{ path('app_main_show_gpx_full') }}">full</a>
</li>
<div style='height: 1.0em;'></div>
{% set class=(route=="app_main_randomoissy" ? "current": "") %}
<li class="{{class}}">
<a href="{{ path('app_main_randomoissy') }}">app_main_randomoissy</a>
</li>
<div style='height: 0.0em;'></div>
{% set class=(route=="app_main_tools" ? "current": "") %}
<li class="{{class}}">
<a href="{{ path('app_main_tools') }}">app_main_tools</a>
</li>
<div style='height: 0.0em;'></div>
{% set class=(route=="app_gps" ? "current": "") %}
<li class="{{class}}">
<a href="{{ path('app_gps') }}">app_gps (convertion GPS</a>
</li>
</ul>
<div style='height: 1rem;'></div>
<h2>Liens complémentaire</h2>
<ul>
<li style="margin-top: 2ex;">
<a href={{ asset("other") }}>./other (public)</a>
</li>
<li style="margin-top: 0.0">
<a href={{ asset("gpx") }}>./gpx (public)</a>
</li>
</ul>
<h2>Liens externes</h2>
<ul>
<li style="">
<a href="http://www.ensiie.fr">ENSIIE</a>
</li>
</ul>
{#
ATTENTION LA LIGNE SUIVANTE FAIT PLANTER SUR ENSTA
Session déjà créé car $_SESSION existe déjà !
#}
{# if is_granted('ROLE_ADMIN') and app.request.server.get("SERVER_NAME") == "localhost" #}
{% if app.user and is_granted('ROLE_ADMIN') %}
{#<a style="color:black;background-color:white;">Ajouter un article (AUTEUR</a>#}
<h2>Menu admin</h2>
{# SERVER_NAME={{ app.request.server.get("SERVER_NAME") }} #}
<ul class='internal_links'>
{#
{% set class=(route=="mpro_admin_index" ? "current": "") %}
<li class="{{class}}">
<a href="{{ path('mpro_admin_index') }}">mpro_admin_index</a>
</li>
#}
{# Je garde comme exemple d'utilisation du service app.request.basepath
<li>
<a href="{{ app.request.basepath }}/var/files/stages">Voir zone Upload : stages</a>
</li>
#}
</ul>
{% else %}
{#- <h2 style="color:#888888;">Menu admin masqué</h2>-#}
{% endif %}