templates/domain/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Liste des domaines OVH{% endblock %}
  3. {% block body %}
  4. <div class="container-fluid listing-project">
  5.     <div class="row">
  6.     {% if domainsDb is defined %}
  7.         <div class="col-12 col-lg-8 offset-lg-2">
  8.             Il y a <strong>{{ domainsNbr }} domaines</strong> ({{ date }}) - <i>{{ domainsNbrToDelete }} domaines en suppression</i>
  9.             {# {{ dump(domainsDb) }} #}
  10.             <table id="domains_list" class="table table-bordered table-hover tablesorter">
  11.                 <thead>
  12.                     <tr class="bg-secondary text-white">
  13.                         <th>Domaine {# ({{ websites|length }}) #}</th>
  14.                         <th>Date expiration</th>
  15.                         <th>Renouvellement auto</th>
  16.                         <th>Suppresion à date</th>
  17.                     </tr>
  18.                 </thead>
  19.                 <tbody>
  20.                   {% for domainDb in domainsDb %}
  21.                     {# {% if domainDb.isDeleteToExpired() %} #}
  22.                     <tr data-index="{{ loop.index }}">
  23.                       <td>
  24.                         <a class="btn-domain-infos" 
  25.                             data-toggle="modal" data-bs-toggle="modal" 
  26.                             data-bs-target="#domainInfos" 
  27.                             href="/domain-infos/{{ domainDb.getNameDomain() }}" 
  28.                             title="Infos du domaine {{ domainDb.getNameDomain() }}">
  29.                           {{ domainDb.getNameDomain() }}
  30.                         </a>
  31.                       </td>
  32.                       <td>{{ domainDb.getDateRenew() | date('Y-m-d') }}</td>
  33.                       <td class="text-center">
  34.                         {% if domainDb.isRenewAutomatic() %}
  35.                           Oui
  36.                         {% endif %}
  37.                       </td>
  38.                       <td class="text-center">
  39.                         {% if domainDb.isDeleteToExpired() %}
  40.                           <span style="display:none;">{{ domainDb.getDateRenew() | date_modify("+2 month") | date_modify("+6 day") | date('Ymd') }}</span>
  41.                           {{ domainDb.getDateRenew() | date_modify("+2 month") | date_modify("+6 day") | date('Y-m-d') }}
  42.                         {% else %}
  43.                           <span style="display:none;">99999999</span>
  44.                         {% endif %}
  45.                       </td>
  46.                     </tr>
  47.                     {# {% endif %} #}
  48.                   {% endfor %}
  49.                 </tbody>
  50.             </table>
  51.         </div>
  52.     {% endif %}
  53.     </div>
  54. </div>
  55. <!-- Modal -->
  56. <div class="modal fade" id="domainInfos" tabindex="-1" role="dialog" aria-labelledby="domainInfosLabel" aria-hidden="true">
  57.   <div class="modal-dialog">
  58.     <div class="modal-content">
  59.       <div class="modal-header">
  60.         {# <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> #}
  61.         <h5 class="modal-title" id="exampleModalLabel">Infos du site</h5>
  62.         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  63.       </div>
  64.       <div class="modal-body">
  65.         <div class="spinner-border" role="status">
  66.           <span class="sr-only">Loading...</span>
  67.         </div>
  68.       </div>
  69.       <div class="modal-footer">
  70.       </div>
  71.     </div>
  72.   </div>
  73. </div>
  74. {% endblock %}