templates/clientWeb/home/communaute.html.twig line 1

Open in your IDE?
  1. {% block communaute %}
  2.     {% if communityCollection is not empty %}
  3.         {# afficher les image de profil en fonction des utilisateur qui ont commenté la plateforme #}
  4. <aside class="container mt-5 mb-5" id="communaute">
  5.     {# <div class="d-flex justify-content-center align-items-center">
  6.         <img class="logo-title pr-3" src="../img/faviconBookpresta.png"
  7.             alt="logo">
  8.         <h2 class="title">Communaut&eacute;</h2>
  9.     </div>#}
  10.     <div class="justify-content-center align-items-center mx-0 px-0 my-0 py-0 title-section">
  11.         <h2 class="title text-right mr-2 py-lg-2 py-0 my-lg-2 my-0">Communaut&eacute;</h2>
  12.     </div>
  13.     {% for comment in communityCollection %}
  14.     <div class="comment">
  15.         <div class="row mt-5">
  16.                 {% if is_granted('ROLE_SUPER_ADMIN') %}
  17.                     {% if comment.userId.profilPicture is not null %}
  18.                         <div class="col-lg-2 col-md-3 col-sm-4 col-3 align-self-center">
  19.                             <img class="img-fluid" src="{{ absolute_url(asset('img/profil/superAdmin/' ~ comment.userId.id ~ '/' ~ comment.userId.profilPicture.pictureProfil)) }}" alt="{{ comment.userId.firstname }} {{ comment.userId.name }}" id="imgProfil"/>
  20.                         </div>
  21.                     {% else %}
  22.                         <div class="col-lg-2 col-md-3 col-sm-4 col-3 align-self-center">
  23.                             <img class="logo-comment img-fluid" src="/img/profil/imgProfilDefault.jpg">
  24.                         </div>
  25.                     {% endif %}
  26.                 {% elseif is_granted('ROLE_ADMIN') %}
  27.                     {% if comment.userId.profilPicture is not null %}
  28.                         <div class="col-lg-2 col-md-3 col-sm-4 col-3 align-self-center">
  29.                             <img class="img-fluid" src="{{ absolute_url(asset('img/profil/admin/' ~ comment.userId.id ~ '/' ~ comment.userId.profilPicture.pictureProfil)) }}" alt="{{ comment.userId.firstname }} {{ comment.userId.name }}" id="imgProfil"/>
  30.                         </div>
  31.                     {% else %}
  32.                         <div class="col-lg-2 col-md-3 col-sm-4 col-3 align-self-center">
  33.                             <img class="logo-comment img-fluid" src="/img/profil/imgProfilDefault.jpg">
  34.                         </div>
  35.                     {% endif %}
  36.                 {% elseif is_granted('ROLE_FOURNISSEUR') %}
  37.                     {% if comment.userId.profilPicture is not null %}
  38.                         <div class="col-lg-2 col-md-3 col-sm-4 col-3 align-self-center">
  39.                             <img class="img-fluid" src="{{ absolute_url(asset('img/profil/professionnal/' ~ comment.userId.id ~ '/' ~ comment.userId.profilPicture.pictureProfil)) }}" alt="{{ comment.userId.firstname }} {{ comment.userId.name }}" id="imgProfil"/>
  40.                         </div>
  41.                     {% else %}
  42.                         <div class="col-lg-2 col-md-3 col-sm-4 col-3 align-self-center">
  43.                             <img class="logo-comment img-fluid" src="/img/profil/imgProfilDefault.jpg">
  44.                         </div>
  45.                     {% endif %}
  46.                 {% elseif is_granted('ROLE_USER') %}
  47.                     {% if comment.userId.profilPicture is not null %}
  48.                         <div class="col-lg-2 col-md-3 col-sm-4 col-3 align-self-center">
  49.                             <img class="img-fluid" src="{{ absolute_url(asset('img/profil/client/' ~ comment.userId.id ~ '/' ~ comment.userId.profilPicture.pictureProfil)) }}" alt="{{ comment.userId.firstname }} {{ comment.userId.name }}" id="imgProfil"/>
  50.                         </div>
  51.                     {% else %}
  52.                         <div class="col-lg-2 col-md-3 col-sm-4 col-3 align-self-center">
  53.                             <img class="logo-comment img-fluid" src="/img/profil/imgProfilDefault.jpg">
  54.                         </div>
  55.                     {% endif %}
  56.                 {% else %}
  57.                     <div class="col-lg-2 col-md-3 col-sm-4 col-3 align-self-center">
  58.                         <img class="logo-comment img-fluid" src="/img/profil/imgProfilDefault.jpg">
  59.                     </div>
  60.                 {% endif %}
  61.             <div class="col">
  62.                 <h4 class="comment-title">{{ comment.userId.pseudonym }}</h4>
  63.                 <p class="text my-0 py-0">Post&eacute; le {{ comment.datePostComment|date("d/m/Y") }}</p>
  64.                 <p>{{ comment.comment |u.truncate(200, '...', false) |raw }}</p>
  65.                 
  66.                 <div class="btn-comment text-right">
  67.                     <a href="{{ path('community') }}" class="btn-plus text-light">Lire la suite</a>
  68.                 </div>
  69.             </div>
  70.         </div>
  71.     </div>
  72.     <hr>
  73.     {% endfor %}
  74.     
  75. </aside>
  76.     {% endif %}
  77. {% endblock %}