templates/computing/show.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Calculs{% endblock %}
  3. {% block body %}
  4. <div class="row">
  5.     <div class="col-12">
  6.         <div class="card">
  7.             <div class="card-body">
  8.             <h2>Detail du calcul</h2>
  9.             <table class="table">
  10.                 <tbody>
  11.                     <tr>
  12.                         <th>Titre</th>
  13.                         <td>{{ computing.Title }}</td>
  14.                     </tr>
  15.                     <tr>
  16.                         <th>Addresse d'origine</th>
  17.                         <td>{{ computing.Addresse }}</td>
  18.                     </tr>
  19.                     <tr>
  20.                         <th>Lon</th>
  21.                         <td>{{ computing.lon }}</td>
  22.                     </tr>
  23.                     <tr>
  24.                         <th>Lat</th>
  25.                         <td>{{ computing.lat }}</td>
  26.                     </tr>
  27.                     <tr>
  28.                         <th>Date choisie</th>
  29.                         <td>{% if computing.departureDateTime is not null %}{{ computing.departureDateTime.format('d M à H:i') }}{% endif %}</td>
  30.                     </tr>
  31.                     <tr>
  32.                         <th>Status</th>
  33.                         <td>{{ computing.getStatusTextInfo }}</td>
  34.                     </tr>
  35.                 </tbody>
  36.             </table>
  37.             </div>
  38.         </div>
  39.         <div class="card">
  40.             <div class="card-body">
  41.                 
  42.             <br/>
  43.                 <h2>Général</h2>
  44.             <br/>
  45.                 <div class="col-lg-6">
  46.                     <div class="card">
  47.                         <div class="card-body">
  48.                             <h4 class="card-title mb-4">Comparatif des temps</h4>
  49.                             <div id="column_chart" class="apex-charts" dir="ltr"></div>
  50.                         </div>
  51.                     </div>
  52.                     <!--end card-->
  53.                 </div>
  54.                 <div class="col-lg-6">
  55.                     <div class="card">
  56.                         <div class="card-body">
  57.                             <h4 class="card-title mb-4">Fichiers</h4>
  58.                              <a href="{{ path('app_computing_export_excell' , {'id': computing.id}) }}" class="btn btn-primary">Export Excell</a>
  59.                         </div>
  60.                     </div>
  61.                     <!--end card-->
  62.                 </div>
  63.                 <script>
  64.                     $( document ).ready(function() {
  65.                         var options = {
  66.                             series: [{
  67.                                 name: 'Marche',
  68.                                 data: [{{ moyennes.aller.walking }}]
  69.                             },
  70.                             {
  71.                                 name: 'Vélo',
  72.                                 data: [{{ moyennes.aller.bicycling }} ]
  73.                             },                                {
  74.                                 name: 'Transport',
  75.                                 data: [{{ moyennes.aller.transit }}]
  76.                             },                                {
  77.                                 name: 'Voiture',
  78.                                 data: [{{ moyennes.aller.driving }}]
  79.                             },
  80.                             ],
  81.                             chart: {
  82.                                 type: 'bar',
  83.                                 height: 350
  84.                             },
  85.                             plotOptions: {
  86.                                 bar: {
  87.                                     horizontal: false,
  88.                                     columnWidth: '15%',
  89.                                     endingShape: 'rounded'
  90.                                 },
  91.                             },
  92.                             dataLabels: {
  93.                                 enabled: false
  94.                             },
  95.                             stroke: {
  96.                                 show: true,
  97.                                 width: 2,
  98.                                 colors: ['transparent']
  99.                             },
  100.                             xaxis: {
  101.                                 categories: ['Aller'],
  102.                             },
  103.                             yaxis: {
  104.                                 title: {
  105.                                     text: 'Temps en min'
  106.                                 }
  107.                             },
  108.                             fill: {
  109.                                 opacity: 1
  110.                             },
  111.                             tooltip: {
  112.                                 y: {
  113.                                     formatter: function (val) {
  114.                                         return  val + " min"
  115.                                     }
  116.                                 }
  117.                             }
  118.                         };
  119.                         var chart = new ApexCharts(document.querySelector("#column_chart"), options);
  120.                         chart.render();
  121.                     });
  122.                 </script>
  123.             </div>
  124.         </div>
  125.         <div class="card">
  126.             <div class="card-body">
  127.                 <h2>Détail par adresses</h2>
  128.             <br/>
  129.                 <table id="datatable-buttons"
  130.                        class="table table-striped table-bordered dt-responsive nowrap"
  131.                        style="border-collapse: collapse; border-spacing: 0; width: 100%; font-size:11px">
  132.                 <thead>
  133.                     <tr>
  134.                         <th>Adresse</th>
  135.                         <th colspan="2">Aller Marche</th>
  136.                         <th colspan="2">Aller Vélo</th>
  137.                         <th colspan="2">Aller Transport</th>
  138.                         <th colspan="2">Aller Voiture</th>
  139.                         {#<th colspan="2">Retour Marche</th>
  140.                         <th colspan="2">Retour Vélo</th>
  141.                         <th colspan="2">Retour Transport</th>
  142.                         <th colspan="2">Retour Voiture</th>#}
  143.                     </tr>
  144.                 </thead>
  145.                 <tbody>
  146.                 {% for timing in timings %}
  147.                     <tr>
  148.                         <th>{{ timing.address_name }}</th>
  149.                         <th>{{ timing.aller.timing.walking }}</th>
  150.                         <th>{{ timing.aller.distance.walking }} </th>
  151.                         <th>{{ timing.aller.timing.bicycling }}</th>
  152.                         <th>{{ timing.aller.distance.bicycling }}</th>
  153.                         <th>{{ timing.aller.timing.transit }}</th>
  154.                         <th>{{ timing.aller.distance.transit }}</th>
  155.                         <th>{{ timing.aller.timing.driving }}</th>
  156.                         <th>{{ timing.aller.distance.driving }}</th>
  157.                         {#
  158.                         <th>{{ timing.retour.timing.walking }}</th>
  159.                         <th>{{ timing.retour.distance.walking }} </th>
  160.                         <th>{{ timing.retour.timing.bicycling }}</th>
  161.                         <th>{{ timing.retour.distance.bicycling }}</th>
  162.                         <th>{{ timing.retour.timing.transit }}</th>
  163.                         <th>{{ timing.retour.distance.transit }}</th>
  164.                         <th>{{ timing.retour.timing.driving }}</th>
  165.                         <th>{{ timing.retour.distance.driving }}</th>#}
  166.                     </tr>
  167.                 {% endfor %}
  168.                 </tbody>
  169.             </table>
  170.                 <br/>
  171.             <a href="{{ path('app_computing_index') }}" class="btn btn-primary">Retour à la liste</a>
  172.             </div>
  173.         </div>
  174.     </div>
  175. </div>
  176. {% endblock %}