templates/buzz/fragments/secteur_tables.html.twig line 1

Open in your IDE?
  1. {% set table_class = 'table table-striped table-bordered' %}
  2. {% if societes_a_reprendre is defined and societes_a_reprendre is not empty and secteur_info is defined and secteur_info %}
  3. <div class="row bkg_blanc">
  4.     <div class="col-12 mt-3">
  5.     <table class="{{ table_class }}">
  6.         <tbody>
  7.         <th style="background-color: #4B7389; color: white; border-bottom: none;">
  8.             {% if secteur_info is defined and secteur_info and secteur_info.nom %}
  9.                 Trouver des sociétés à reprendre dans le secteur "{{ secteur_info.nom }}"
  10.             {% else %}
  11.                 Trouver des sociétés à reprendre dans ce secteur
  12.             {% endif %}
  13.         </th>
  14.         {% if societes_a_reprendre is not empty %}
  15.             {% for societe in societes_a_reprendre %}
  16.                 <tr>
  17.                     <td>
  18.                         
  19.                           {% if societe.titre|default   %} 
  20.                                     <a href="/vente-entreprise-{{ societe.titre|slugify }},{{ societe.id_annonce_vendeur }}{{ codePaysWithUnderScore }}"
  21.                                       target="_blank" rel="noopener">{{ societe.titre }}</a>
  22.                           {% endif %}
  23.                              
  24.                              
  25.                            <br>
  26.                         <div class="float-left">
  27.                             <small>
  28.                                 CA : {{ societe.ca ? societe.ca|number_format(0, '.', ' ') ~ ' k€' : 'N.C.' }}
  29.                                 <span class="dotted-separator"></span>
  30.                                 {% if societe.id_annonce_vendeur %}
  31.                                     Réf. : V{{ societe.id_annonce_vendeur }}
  32.                                     <span class="dotted-separator"></span>
  33.                                 {% endif %}
  34.                                 {% if societe.date_parution is defined and societe.date_parution %}
  35.                                     {% set d = societe.date_parution %}
  36.                                     {% if d is iterable %}
  37.                                         <span class="text-nowrap">Posté le {{ d|date('d/m/Y') }}</span>
  38.                                     {% else %}
  39.                                         {% set ds = (d|length == 8) ? d|slice(6,2) ~ '/' ~ d|slice(4,2) ~ '/' ~ d|slice(0,4) : d %}
  40.                                         <span class="text-nowrap">Posté le {{ ds }}</span>
  41.                                     {% endif %}
  42.                                     <span class="dotted-separator"></span>
  43.                                 {% endif %}
  44.                                 {% if societe.pays %}
  45.                                     <span class="text-nowrap">{{ societe.pays }}</span>
  46.                                 {% endif %}
  47.                             </small>
  48.                         </div>
  49.                     </td>
  50.                 </tr>
  51.             {% endfor %}
  52.         {% endif %}
  53.         <tr>
  54.             <td class="text-center">
  55.                 {% if secteur_info is defined and secteur_info %}
  56.                     <a href="/cession-entreprise-{{ secteur_info.nom|slugify }},{{ secteur_info.id|default('') }}{{ codePaysWithUnderScore }}"
  57.                        class="fullsouligne" target="_blank">
  58.                         Les sociétés à reprendre du secteur "{{ secteur_info.nom|default('') }}"
  59.                         {% if localisation_info is defined and localisation_info %}
  60.                             / en {{ localisation_info.nom_localisation|abv_nom_localisation|raw }}
  61.                         {% endif %}
  62.                     </a>
  63.                 {% else %}
  64.                     <a href="#" class="fullsouligne">Les sociétés à reprendre du secteur</a>
  65.                 {% endif %}
  66.             </td>
  67.         </tr>
  68.         </tbody>
  69.     </table>
  70.     </div>
  71. </div>
  72. {% endif %}
  73. {% if acquereurs_secteur is defined and acquereurs_secteur is not empty and secteur_info is defined and secteur_info %}
  74. <div class="row bkg_blanc">
  75.     <div class="col-12">
  76.     <table class="{{ table_class }}">
  77.         <tbody>
  78.         <th style="background-color: #5f9779; color: white; border-bottom: none;">
  79.             {% if secteur_info is defined and secteur_info and secteur_info.nom %}
  80.                 Ils veulent faire des acquisitions dans le secteur "{{ secteur_info.nom }}"
  81.             {% else %}
  82.                 Ils veulent faire des acquisitions dans ce secteur
  83.             {% endif %}
  84.         </th>
  85.         {% if acquereurs_secteur is not empty %}
  86.             {% for acquereur in acquereurs_secteur %}
  87.                 <tr>
  88.                     <td>
  89.                         <a href="/achat-entreprise-{{ acquereur.raison_sociale|slugify }},{{ (acquereur.id_annonce_acheteur is defined and acquereur.id_annonce_acheteur) ? acquereur.id_annonce_acheteur : acquereur.id_societe }}{{ codePaysWithUnderScore }}"
  90.                            target="_blank" rel="noopener">{{ acquereur.raison_sociale }}</a><br>
  91.                         <div class="float-left">
  92.                             <small>
  93.                                 CA Max : {{ acquereur.ca ? acquereur.ca|number_format(0, '.', ' ') ~ ' k€' : 'N.C.' }}
  94.                                 <span class="dotted-separator"></span>
  95.                                 {% set refA = (acquereur.id_annonce_acheteur is defined and acquereur.id_annonce_acheteur) ? acquereur.id_annonce_acheteur : (acquereur.id_societe is defined ? acquereur.id_societe : null) %}
  96.                                 {% if refA %}
  97.                                     Réf. : A{{ refA }}
  98.                                 {% endif %}
  99.                                 {% if acquereur.date_parution is defined and acquereur.date_parution %}
  100.                                     <span class="dotted-separator"></span>
  101.                                     {% set d2 = acquereur.date_parution %}
  102.                                     {% if d2 is iterable %}
  103.                                         <span class="text-nowrap">Posté le {{ d2|date('d/m/Y') }}</span>
  104.                                     {% else %}
  105.                                         {% set ds2 = (d2|length == 8) ? d2|slice(6,2) ~ '/' ~ d2|slice(4,2) ~ '/' ~ d2|slice(0,4) : d2 %}
  106.                                         <span class="text-nowrap">Posté le {{ ds2 }}</span>
  107.                                     {% endif %}
  108.                                 {% endif %}
  109.                                 {% if acquereur.pays %}
  110.                                     <span class="dotted-separator"></span>
  111.                                     <span class="text-nowrap">{{ acquereur.pays }}</span>
  112.                                 {% endif %}
  113.                             </small>
  114.                         </div>
  115.                     </td>
  116.                 </tr>
  117.             {% endfor %}
  118.         {% endif %}
  119.         <tr>
  120.             <td class="text-center">
  121.                 {% if secteur_info is defined and secteur_info %}
  122.                     <a href="/reprise-entreprise-{{ secteur_info.nom|slugify }},{{ secteur_info.id|default('') }}{{ codePaysWithUnderScore }}"
  123.                        class="fullsouligne" target="_blank">
  124.                         Les acheteurs du secteur "{{ secteur_info.nom|default('') }}"
  125.                     </a>
  126.                 {% else %}
  127.                     <a href="#" class="fullsouligne">Les acheteurs du secteur</a>
  128.                 {% endif %}
  129.             </td>
  130.         </tr>
  131.         </tbody>
  132.     </table>
  133.     </div>
  134. </div>
  135. {% endif %}