templates/website/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Liste sites web{% endblock %}
  3. {% block body %}
  4. <div class="container-fluid listing-project">
  5.     <div class="row">
  6.         <div class="col-12 col-md-3">
  7.             <p><button class="btn bg-secondary text-white" data-bs-toggle="modal" data-bs-target="#confirmeAdd">Ajouter un site</button></p>
  8.         </div>
  9.         <div class="col-12 col-md-9">
  10.             <div class="filters d-flex justify-content-end">
  11.                 <!-- <button type="button" class="btn btn-default btn-sm check-stats" aria-label="Left Align">Vérif Stats <span class="glyphicon glyphicon-signal" aria-hidden="true"></span></button> -->
  12.                 <label for="filter-active-website" class="mx-2"><select id="filter-active-website" class="form-select" >
  13.                   <option value="-">Etat du site</option>
  14.                   <option value="actif">actif</option>
  15.                   <option value="inactif">inactif</option>
  16.                   <option value="en-cours">en cours</option>
  17.                   <option value="mail_only">mail only</option>
  18.                 </select></label>
  19.                 {# <label for="filter-stat_system" class="mx-2"><select id="filter-stat_system" class="form-select" >
  20.                   <option value="-">Système de stat</option>
  21.                   <option value="ficon-piwik_logo">Piwik</option>
  22.                   <option value="ficon-google_logo">Google analytics</option>
  23.                   <option value="ficon-myvisit_logo">phpMyVisites</option>
  24.                   <option value="glyphicon-remove">aucun</option>
  25.                 </select></label> #}
  26.                 <label for="filter-server" class="mx-2"><select id="filter-server" class="form-select" >
  27.                   <option value="-">Serveur</option>
  28.                   <option value="mutu01">Mutu01</option>
  29.                   <option value="mutu02">Mutu02</option>
  30.                   <option value="mutu03">Mutu03</option>
  31.                   <option value="mutu04">Mutu04</option>
  32.                   <option value="mutu05">Mutu05</option>
  33.                   <option value="mutu06">Mutu06</option>
  34.                   <option value="mutu07">Mutu07</option>
  35.                   <option value="mutu08">Mutu08</option>
  36.                   <option value="ovhicom06">ovhicom06</option>
  37.                   <option value="vm-icom.planetb">vm-icom.planetb</option>
  38.                   <option value="castral-roc.mh">castral-roc.mh</option>
  39.                   <option value="Wix">Wix</option>
  40.                 </select></label>
  41.                 <label for="filter-phpversion" class="mx-2"><select id="filter-phpversion" class="form-select" >
  42.                   <option value="-">PHP</option>
  43.                 </select></label>
  44.                 <label for="filter-type" class="mx-2"><select id="filter-type" class="form-select" >
  45.                   <option value="-">Type CMS</option>
  46.                   <option value="CMSMS">CMSMS</option>
  47.                   <option value="Contenu PLESK">Contenu PLESK</option>
  48.                   <option value="Other CMS">Other CMS</option>
  49.                   <option value="OwnCloud">OwnCloud</option>
  50.                   <option value="Prestashop">Prestashop</option>
  51.                   <option value="Symfony">Symfony</option>
  52.                   <option value="Wordpress">Wordpress</option>
  53.                   <option value="Shop">Woocommerce</option>
  54.                   <option value="Wordpress GENESIS">Wordpress GENESIS</option>
  55.                   <option value="Wordpress WPMS">Wordpress WPMS</option>
  56.                   <option value="Wordpress WebSity">Wordpress WebSity</option>
  57.                   <option value="Wordpress WebSity Shop">Wordpress WebSity Shop</option>
  58.                   <option value="Wordpress OnePage">Wordpress OnePage</option>
  59.                   <option value="Wix">Wix</option>
  60.                 </select></label>
  61.             </div>
  62.         </div>
  63.     </div>
  64.     <div class="row">
  65.         <div class="col-12">
  66.             {# {{ dump(websites) }} #}
  67.             <table id="table_listing_projects" class="table table-bordered table-hover tablesorter">
  68.                 <thead>
  69.                     <tr class="bg-secondary text-white">
  70.                         <th>Domaine {# ({{ websites|length }}) #}</th>
  71.                         {# <th class="header-stats">Stats</th> #}
  72.                         <th>Type</th>
  73.                         <th>Version</th>
  74.                         <th>Date de création</th>
  75.                         <th>Date MAJ tech</th>
  76.                         <th>Serveur</th>
  77.                         <th>HTTPS</th>
  78.                         <th>PHP</th>
  79.                         <th>RGPD</th>
  80.                         <th>Taille</th>
  81.                         <th>{# action #}</th>
  82.                     </tr>
  83.                 </thead>
  84.                 <tbody>
  85.                 {% set total_size = 0 %}
  86.                 {% for website in websites %}
  87.                     <tr data-index="{{ loop.index }}">
  88.                         {# <i class="bi bi-globe"></i> #}
  89.                         {# <i class="bi bi-exclamation-triangle-fill"></i> #}
  90.                         <td class="{{ website.getStatut() }}">
  91.                             {% if website.getStatut() == 'actif' %}
  92.                                 <span class="text-success">
  93.                                 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-globe" viewBox="0 0 16 16">
  94.                                   <path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm7.5-6.923c-.67.204-1.335.82-1.887 1.855A7.97 7.97 0 0 0 5.145 4H7.5V1.077zM4.09 4a9.267 9.267 0 0 1 .64-1.539 6.7 6.7 0 0 1 .597-.933A7.025 7.025 0 0 0 2.255 4H4.09zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a6.958 6.958 0 0 0-.656 2.5h2.49zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5H4.847zM8.5 5v2.5h2.99a12.495 12.495 0 0 0-.337-2.5H8.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5H4.51zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5H8.5zM5.145 12c.138.386.295.744.468 1.068.552 1.035 1.218 1.65 1.887 1.855V12H5.145zm.182 2.472a6.696 6.696 0 0 1-.597-.933A9.268 9.268 0 0 1 4.09 12H2.255a7.024 7.024 0 0 0 3.072 2.472zM3.82 11a13.652 13.652 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5H3.82zm6.853 3.472A7.024 7.024 0 0 0 13.745 12H11.91a9.27 9.27 0 0 1-.64 1.539 6.688 6.688 0 0 1-.597.933zM8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855.173-.324.33-.682.468-1.068H8.5zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.65 13.65 0 0 1-.312 2.5zm2.802-3.5a6.959 6.959 0 0 0-.656-2.5H12.18c.174.782.282 1.623.312 2.5h2.49zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7.024 7.024 0 0 0-3.072-2.472c.218.284.418.598.597.933zM10.855 4a7.966 7.966 0 0 0-.468-1.068C9.835 1.897 9.17 1.282 8.5 1.077V4h2.355z"/>
  95.                                 </svg>
  96.                                 </span>
  97.                             {% elseif website.getStatut() == 'en-cours' %}
  98.                                 <span class="text-warning">
  99.                                 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clock-fill" viewBox="0 0 16 16">
  100.                                   <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z"/>
  101.                                 </svg>
  102.                                 </span>
  103.                             {% elseif website.getStatut() == 'mail_only' %}
  104.                                 <span class="text-info">
  105.                                 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-envelope-fill" viewBox="0 0 16 16">
  106.                                   <path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z"/>
  107.                                 </svg>
  108.                                 </span>
  109.                             {% elseif website.getStatut() == 'archive' %}
  110.                                 <span class="text-secondary">
  111.                                 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-archive-fill" viewBox="0 0 16 16">
  112.                                   <path d="M12.643 15C13.979 15 15 13.845 15 12.5V5H1v7.5C1 13.845 2.021 15 3.357 15h9.286zM5.5 7h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zM.8 1a.8.8 0 0 0-.8.8V3a.8.8 0 0 0 .8.8h14.4A.8.8 0 0 0 16 3V1.8a.8.8 0 0 0-.8-.8H.8z"/>
  113.                                 </svg>
  114.                                 </span>
  115.                             {% else %}
  116.                                 <span class="text-danger">
  117.                                 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-exclamation-triangle-fill" viewBox="0 0 16 16">
  118.                                   <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
  119.                                 </svg>
  120.                                 </span>
  121.                             {% endif %}
  122.                             <a target="_blank" href="http://{{ website.getUrlPrincipal() }}" title="Voir le site">{{ website.getUrlPrincipal() }}</a>
  123.                         </td>
  124.                         {# <td class="have_stats">
  125.                             {% if website.getStatsArray() is defined %}
  126.                             {% endif %}
  127.                         </td> #}
  128.                         <td class="type_cms"><small>{{ website.getCmsType() }}</small></td>
  129.                         <td class="v_cms"><small>{{ website.getCmsVersion() }}</small></td>
  130.                         <td class="date_create"><small>{{ website.getDateCreation() | date('YC-m-d') }}</small></td>
  131.                         <td class="date_upd">
  132.                           <small>
  133.                             {% if website.getDateUpdate() %}
  134.                               {{ website.getDateUpdate() | date('Y-m-d H:i:s') }}
  135.                             {% else %}
  136.                               
  137.                             {% endif %}
  138.                           </small>
  139.                         </td>
  140.                         <td class="server">{{ website.getServeur() }}</td>
  141.                         <td class="https text-center">
  142.                             {% if website.isIsHttps() %}
  143.                                 <small><span class="badge bg-success">OUI</span></small>
  144.                             {% else %}
  145.                                 <small><span class="badge bg-danger">NON</span></small>
  146.                             {% endif %}
  147.                         </td>
  148.                         <td class="phpversion"><small>{{ website.getVersionPhp() }}</small></td>
  149.                         <td class="rgpd text-center">
  150.                             {% if website.isIsRgpd() %}
  151.                                 <small><span class="badge bg-success">OUI</span></small>
  152.                             {% else %}
  153.                                 <small><span class="badge bg-danger">NON</span></small>
  154.                             {% endif %}
  155.                         </td>
  156.                         <td class="size">
  157.                           <small>
  158.                             {% if website.getSize() is not null %}{% set total_size = total_size + website.getSize() %}{% endif %}
  159.                             {% if website.getSize() > 1100 %}
  160.                               {{ (website.getSize()/1024)|round(2, 'floor') }}Go
  161.                             {% elseif website.getSize() is not null %}
  162.                               {{ website.getSize() }}Mo
  163.                             {% else %}
  164.                               -
  165.                             {% endif %}
  166.                           </small>
  167.                         </td>
  168.                         <td class="btn_action">
  169.                             <a data-toggle="modal" data-bs-toggle="modal" data-bs-target="#updateInfos"  href="/update-website/{{ website.getUrlPrincipal() }}" data-update="{{ website.getUrlPrincipal() }}" class="btn btn-sm btn-xs btn-info py-0" title="Mettre à jour les données"><i class="fas fa-sync-alt"></i></a>
  170.                             &nbsp;&nbsp;|&nbsp;&nbsp;
  171.                             <a data-toggle="modal" data-bs-toggle="modal" data-bs-target="#formEdit" href="#" data-id="{{ website.getId() }}" data-edit="{{ website.getUrlPrincipal() }}" class="btn btn-sm btn-xs btn-primary py-0" title="Modifier"><i class="fas fa-pen"></i></a>
  172.                             <!-- &nbsp;&nbsp;|&nbsp;&nbsp;
  173.                             <a data-toggle="modal" data-bs-toggle="modal" data-bs-target="#confirmeDelete" href="#" data-delete="{{ website.getUrlPrincipal() }}" class="btn btn-sm btn-xs btn-danger py-0" title="Supprimer"><i class="fas fa-trash-alt"></i></a> -->
  174.                         </td>
  175.                     </tr>
  176.                 {% endfor %}
  177.                 </tbody>
  178.             </table>
  179.         </div>
  180.     </div>
  181. </div>
  182. <div>Total size : {{(total_size/1024)|round(2, 'floor') }}Go</div>
  183. <!-- Modal -->
  184. <div class="modal fade" id="updateInfos" tabindex="-1" aria-labelledby="Mise à jour" aria-hidden="true">
  185.   <div class="modal-dialog">
  186.     <div class="modal-content">
  187.       <div class="modal-header">
  188.         <h5 class="modal-title" id="updateInfos">Mise à jour des infos</h5>
  189.         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  190.       </div>
  191.       <div class="modal-body loading">
  192.         <div class="spinner-border" role="status">
  193.           <span class="sr-only">Loading...</span>
  194.         </div>
  195.         <ul>
  196.           <li><b>Domaine :</b>&nbsp;<span data-info="domaine"></span></li>
  197.           <li><b>Type :</b>&nbsp;<span data-info="cms"></span></li>
  198.           <li><b>Version :</b>&nbsp;<span data-info="v_cms"></span></li>
  199.           <li><b>Date de création :</b>&nbsp;<span data-info="date_create"></span></li>
  200.           <li><b>Serveur :</b>&nbsp;<span data-info="serveur"></span></li>
  201.           <li><b>HTTPS :</b>&nbsp;<span data-info="is_https"></span></li>
  202.           <li><b>Version PHP :</b>&nbsp;<span data-info="v_php"></span></li>
  203.           <li><b>RGPD :</b>&nbsp;<span data-info="is_rgpd"></span></li>
  204.           <li><b>Taille :</b>&nbsp;<span data-info="size"></span></li>
  205.         </ul>
  206.       </div>
  207.       <div class="modal-footer">
  208.         <button type="button" data-bs-dismiss="modal" class="btn btn-secondary">OK</button>
  209.       </div>
  210.     </div>
  211.   </div>
  212. </div>
  213. <!-- Modal -->
  214. <div class="modal fade" id="formEdit" tabindex="-1" aria-labelledby="Modification" aria-hidden="true">
  215.   <div class="modal-dialog">
  216.     <div class="modal-content">
  217.       <div class="modal-header">
  218.         <h5 class="modal-title" id="exampleModalLabel">Modification de site</h5>
  219.         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  220.       </div>
  221.       <div class="modal-body">
  222.         <input type="hidden" id="website-id">
  223.         <p>
  224.           <label for="urlPrincipal">
  225.             <span>Domaine</span>
  226.             <input type="text" readonly disable id="urlPrincipal" class="form-control" placeholder="domane.dtl">
  227.           </label>  
  228.           <label for="edit-statut">
  229.             <span>Statut</span>
  230.             <select name="edit-statut" id="edit-statut" class="form-control">
  231.               <option value="">-</option>
  232.               <option value="inactif">Inactif</option>
  233.               <option value="en-cours">En cours</option>
  234.               <option value="actif">Actif</option>
  235.               <option value="archive">Archivé</option>
  236.             </select>
  237.           </label>  
  238.         </p>
  239.         {# <label for="edit-dateUpdate">
  240.           <button type="button" class="btn btn-primary">Mise à jour techique effectuée</button>
  241.         </label>   #}
  242.       </div>
  243.       <div class="modal-footer">
  244.         <button type="button" class="btn btn-danger" data-bs-dismiss="modal">Annuler</button>
  245.         <a href="#" class="btn btn-success">Modifier</a>
  246.       </div>
  247.     </div>
  248.   </div>
  249. </div>
  250. <!-- Modal -->
  251. <div class="modal fade" id="confirmeAdd" tabindex="-1" aria-labelledby="confirmeAddLabel" aria-hidden="true">
  252.   <div class="modal-dialog">
  253.     <div class="modal-content">
  254.       <div class="modal-header">
  255.         <h5 class="modal-title" id="confirmeAddLabel">Ajout de site</h5>
  256.         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  257.       </div>
  258.       <div class="modal-body">
  259.         <input type="text" id="append-website" class="form-control" placeholder="domane.dtl">
  260.       </div>
  261.       <div class="modal-footer">
  262.         <button type="button" class="btn btn-danger" data-bs-dismiss="modal">Annuler</button>
  263.         <button type="button" class="btn btn-success">Ajouter</button>
  264.       </div>
  265.     </div>
  266.   </div>
  267. </div>
  268. <!-- Modal -->
  269. <div class="modal fade" id="confirmeDelete" tabindex="-1" role="dialog" aria-labelledby="confirmeDeleteLabel" aria-hidden="true">
  270.   <div class="modal-dialog">
  271.     <div class="modal-content">
  272.       <div class="modal-header">
  273.         {# <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> #}
  274.         <h5 class="modal-title" id="exampleModalLabel">Suppression de site</h5>
  275.         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  276.       </div>
  277.       <div class="modal-body">
  278.         <div class="spinner-border" role="status">
  279.           <span class="sr-only">Loading...</span>
  280.         </div>
  281.         <h4 class="modal-title" id="confirmeDeleteLabel">Êtes vous sûr de vouloir supprimer le site <b>'+domaine+'</b> du listing ?</h4>
  282.       </div>
  283.       <div class="modal-footer">
  284.         <button type="button" class="btn btn-danger" data-bs-dismiss="modal">Non</button>
  285.         <a href="#" class="btn btn-success">Oui</a>
  286.       </div>
  287.     </div>
  288.   </div>
  289. </div>
  290. {% endblock %}