templates/routes/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Accueil{% endblock %}
  3. {% block body %}
  4.     <div class="container-fluid">
  5.         <h1 style="text-align: center; color: #069; margin: 5%">Resultats des investigations geotechniques  et de recherche de point d’eau le long des axes routiers prioritaires</h1>
  6.         <div class="row">
  7.             <div class="col-sm-3">
  8.                 <!--h1>Emprunts index</h1-->
  9.                 <a class="menu_lien" href="{{ path('default') }}">Accueil</a> {#- 
  10.                 <a class="menu_lien" href="{{ path('routes_new') }}">Nouvel enregistrement</a>#}<br/><br/>
  11.                 <div style='overflow:scroll; height:700px;'>
  12.                     <table class="table" id="dtables">
  13.                         <thead>
  14.                             <tr>
  15.                                 <th>Nom</th>
  16.                                 <th>Coordonnées des Emp. et points d'eau</th>
  17.                             </tr>
  18.                         </thead>
  19.                         <tbody>
  20.                             {% for route in routes %}
  21.                                 <tr>
  22.                                     <td>
  23.                                         {{ route.nom }}<br/>
  24.                                         {%  if  route.fichiers is not empty %}
  25.                                             {% for  fichier in route.fichiers %}
  26.                                                 <a target="_blank" href="{{ asset('uploads/'~ fichier.nom) }}" title="Fichier enregistré">{{ fichier.rnom }}</a><br/>
  27.                                             {% endfor %}
  28.                                         {%  else %}
  29.                                             <span style="color:red">Aucun fichier enregistré</span>
  30.                                         {%  endif %}
  31.                                         <br/>
  32.                                         <a href="{{ path('routes_edit', {'id': route.id}) }}">Modifier</a>
  33.                                     </td>
  34.                                     <td style='width: 70%'>
  35.                                         {% if route.emprunts is not empty %}
  36.                                             <h6><u>Liste des emprunts</u></h6>
  37.                                                     {% for emprunt in route.emprunts %}
  38.                                                 <div><button class='btn btn-link select_elt'  id='{{ asset('map/#13/'~emprunt.latitude~'/'~ emprunt.longitude) }}'>{{ emprunt.nom }}</button></div>
  39.                                                 {% endfor %}
  40.                                             {% endif %}
  41.                                             {% if route.pointEaux is not empty %}
  42.                                             <h6><u>Liste des points d'eau</u></h6>
  43.                                                     {% for pointeau in route.pointEaux %}
  44.                                                 <div style="text-align: left"><button class='btn btn-link select_elt' id='{{ asset('map/#13/'~pointeau.latitude~'/'~ pointeau.longitude) }}'>{{ pointeau.nom }}</button></div>
  45.                                                 {% endfor %}
  46.                                             {% endif %}
  47.                                     </td>
  48.                                 </tr>
  49.                             {% else %}
  50.                                 <tr>
  51.                                     <td colspan="3">Aucun enregistrement</td>
  52.                                 </tr>
  53.                             {% endfor %}
  54.                         </tbody>
  55.                     </table>
  56.                 </div>
  57.             </div>
  58.             <div class="col-sm-9">
  59.                 <!--a href="{{ path('emprunts_index') }}">Liste des emprunts</a> - <a href="{{ path('point_eaux_index') }}">Liste des points d'eaux</a-->
  60. <div style="font-size: 120%"><span style="color: blue">Point bleu</span> pour les points d'eau - <span style="color: orange">Point orange</span> et <span style="color: red">point rouge</span> pour les emprunts lateriques en fonction des coordonnées UTM 29P et 30P</div>
  61.  <!--- 
  62.                 <div style="background-color:#00A096;" iddiv="box_1" class="mymagicoverbox"> Please click me ! </div>
  63.                 <div id="myfond_gris" opendiv=""></div>-->
  64.                 <div class="embed-responsive embed-responsive-16by9" style="border: 1px solid #999; margin-top: 15px"  >
  65.                     <iframe class="lazyload embed-responsive-item" src="{{ asset('map/#7/13/-7') }}" allowfullscreen loading="lazy"></iframe>
  66.                 </div>
  67.                 <!--div align="center">
  68.                     <div style="background-color:#00A096;" iddiv="box_1" class="mymagicoverbox">
  69.                         Please click me !
  70.                     </div>
  71.                     <div style="background-color:#F8B334;" iddiv="box_2" class="mymagicoverbox">
  72.                         And click me too...
  73.                     </div>
  74.                 </div>
  75.                 <div id="box_1" class="mymagicoverbox_fenetre" style="left:-225px; width:450px;">
  76.                     Title of the first box !
  77.                     <div class="mymagicoverbox_fenetreinterieur" style="height:150px; ">
  78.                         <div align="center">
  79.                             <br>Hum... Are you really sure ?
  80.                             <br><br>
  81.                             <div style="width:100px" align="center" class="mymagicoverbox_fermer">NO I'M NOT</div>
  82.                         </div>
  83.                     </div>
  84.                 </div-->
  85.                 <br/><br/>
  86.             </div>
  87.         </div>
  88.     </div>
  89. {% endblock %}
  90. {% block javascripts %}
  91.     {{ parent() }}
  92.     <script type="text/javascript">
  93.         $(document).ready(function () {
  94.             $('.select_elt').on('click', function () {
  95.                 var url = $(this).attr('id');
  96.                 //alert(url)
  97.                 $('.embed-responsive-item').attr('src', url);
  98.                 $('#myfond_gris').fadeIn(300);
  99.                 var iddiv = $(this).attr("iddiv");
  100.                 $('#' + iddiv).fadeIn(300);
  101.                 $('#myfond_gris').attr('opendiv', iddiv);
  102.                 return false;
  103.             });
  104.         });
  105.     </script>
  106.     <script>
  107.         if ('loading' in HTMLIFrameElement.prototype) {
  108.             const iframes = document.querySelectorAll('iframe[loading="lazy"]');
  109.             iframes.forEach(iframe => {
  110.                 iframe.src = iframe.dataset.src;
  111.             });
  112.         } else {
  113.             // Dynamically import the LazySizes library
  114.             const script = document.createElement('script');
  115.             script.src =
  116.                     'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.2/lazysizes.min.js';
  117.             document.body.appendChild(script);
  118.         }
  119.     </script>
  120.     <script>
  121.         $(document).ready(function () {
  122.             $(".mymagicoverbox").click(function ()
  123.             {
  124.                 $('#myfond_gris').fadeIn(300);
  125.                 var iddiv = $(this).attr("iddiv");
  126.                 $('#' + iddiv).fadeIn(300);
  127.                 $('#myfond_gris').attr('opendiv', iddiv);
  128.                 return false;
  129.             });
  130.             $('#myfond_gris, .mymagicoverbox_fermer').click(function ()
  131.             {
  132.                 var iddiv = $("#myfond_gris").attr('opendiv');
  133.                 $('#myfond_gris').fadeOut(300);
  134.                 $('#' + iddiv).fadeOut(300);
  135.             });
  136.         });
  137.     </script>
  138. {% endblock %}