templates/office/show.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ setting.siteName }} : {{ office.titre }}{% endblock %}
  3. {% block body %}
  4. <section class="container pt-4 pb-5">
  5.     <div class="row pt-3">
  6.         <div class="col">
  7.             {# Breadcrumbs #}
  8.             <div class="row">
  9.                 <div class="col small">
  10.                     <nav style="--bs-breadcrumb-divider: url(&#34;data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E&#34;);"
  11.                         aria-label="breadcrumb">
  12.                         <ol class="breadcrumb small">
  13.                             <li class="breadcrumb-item"><a href="{{ path('app_home') }}" class="text-decoration-none text-dark">Accueil</a></li>
  14.                             <li class="breadcrumb-item active" aria-current="page"><a href="{{ path('app_office') }}" class="text-decoration-none text-dark">Nos offices</a></li>
  15.                             <li class="breadcrumb-item active" aria-current="page">{{ office.titre }}</li>
  16.                         </ol>
  17.                     </nav>
  18.                 </div>
  19.             </div>
  20.         </div>
  21.     </div>
  22.     <div class="row mt-4">
  23.         <div class="col text-center">
  24.             <div class="border rounded pt-2 mb-4">
  25.                 <h1 class="fw-bold color1">{{ office.titre }}</h1>
  26.                 <p>{{ office.adresse }}</p>
  27.                 <p>Téléphone : {{ office.telephone }}</p>
  28.             </div>
  29.             <p>
  30.                 <img src="{{ asset('assets/img/offices/' ~ office.image) }}" alt="{{ office.titre }}" class="img-fluid">
  31.             </p>
  32.             <div class="my-4 bg-light p-3 rounded">
  33.                 {{ office.presentation|replace({'<p style="text-align:justify">': '<p style="text-align:center;">', '<span style="font-size:14px">': '<span style="font-size:15px;">',})|raw }}
  34.             </div>
  35.         </div>
  36.     </div>
  37.     <div class="row mt-4">
  38.         <div class="col-lg-5 col-sm-12 text-center">
  39.             {# <iframe src="{{ office.map }}" width="100%" height="400" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe> #}
  40.             <div class="googlemapsembed" data-url="{{ office.map }}" width="100%" height="500"></div>
  41.         </div>
  42.         <div class="col-lg-7 col-sm-12 text-center d-flex align-items-center justify-content-center flex-column">
  43.                 <p>
  44.                     {{ office.metro|raw }}
  45.                     {{ office.bus|raw }}
  46.                 </p>
  47.                 <p>{{ office.parking|raw }}</p>
  48.                 <p>{{ office.accesPmr|raw }}</p>
  49.         </div>
  50.     </div>
  51.     {# AVIS #}
  52.     <div class="row mt-5">
  53.         <h2 class="text-center mb-4 border rounded">Les avis</h2>
  54.         <div class="col">
  55.             <div class="row row-cols-1 row-cols-md-4 g-4 d-flex justify-content-center">
  56.                 {% for avis in avis %}
  57.                     <div class="col">
  58.                         <div class="card h-100">
  59.                             {# <img src="{{ asset('assets/img/avis/' ~ av.image) }}" class="card-img-top img-fluid" alt="{{ av.firstname }} {{ av.lastname }}"> #}
  60.                             <div class="card-body">
  61.                                 <img src="{{ asset('assets/img/avis/' ~ avis.image ) }}" class="rounded-circle img-fluid float-start me-3" alt="Avis" style="max-width: 50px; width: 100%;">
  62.                                 <h5 class="card-title">{{ avis.firstname }} {{ avis.lastname }}</h5>
  63.                                 {% set avis5 =
  64.                                     '<svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  65.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  66.                                                                 class="iconify iconify--ic" width="17" height="17"
  67.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  68.                                                                 <path fill="currentColor"
  69.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  70.                                                                 </path>
  71.                                                             </svg>
  72.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  73.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  74.                                                                 class="iconify iconify--ic" width="17" height="17"
  75.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  76.                                                                 <path fill="currentColor"
  77.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  78.                                                                 </path>
  79.                                                             </svg>
  80.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  81.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  82.                                                                 class="iconify iconify--ic" width="17" height="17"
  83.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  84.                                                                 <path fill="currentColor"
  85.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  86.                                                                 </path>
  87.                                                             </svg>
  88.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  89.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  90.                                                                 class="iconify iconify--ic" width="17" height="17"
  91.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  92.                                                                 <path fill="currentColor"
  93.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  94.                                                                 </path>
  95.                                                             </svg>
  96.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  97.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  98.                                                                 class="iconify iconify--ic" width="17" height="17"
  99.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  100.                                                                 <path fill="currentColor"
  101.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  102.                                                                 </path>
  103.                                                             </svg>'
  104.                                 %}
  105.                                 {% set avis4 =
  106.                                     '<svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  107.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  108.                                                                 class="iconify iconify--ic" width="17" height="17"
  109.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  110.                                                                 <path fill="currentColor"
  111.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  112.                                                                 </path>
  113.                                                             </svg>
  114.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  115.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  116.                                                                 class="iconify iconify--ic" width="17" height="17"
  117.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  118.                                                                 <path fill="currentColor"
  119.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  120.                                                                 </path>
  121.                                                             </svg>
  122.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  123.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  124.                                                                 class="iconify iconify--ic" width="17" height="17"
  125.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  126.                                                                 <path fill="currentColor"
  127.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  128.                                                                 </path>
  129.                                                             </svg>
  130.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  131.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  132.                                                                 class="iconify iconify--ic" width="17" height="17"
  133.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  134.                                                                 <path fill="currentColor"
  135.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  136.                                                                 </path>
  137.                                                             </svg>
  138.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  139.                                                             '
  140.                                 %}
  141.                                 {% set avis3 =
  142.                                     '<svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  143.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  144.                                                                 class="iconify iconify--ic" width="17" height="17"
  145.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  146.                                                                 <path fill="currentColor"
  147.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  148.                                                                 </path>
  149.                                                             </svg>
  150.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  151.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  152.                                                                 class="iconify iconify--ic" width="17" height="17"
  153.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  154.                                                                 <path fill="currentColor"
  155.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  156.                                                                 </path>
  157.                                                             </svg>
  158.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  159.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  160.                                                                 class="iconify iconify--ic" width="17" height="17"
  161.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  162.                                                                 <path fill="currentColor"
  163.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  164.                                                                 </path>
  165.                                                             </svg>
  166.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  167.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  168.                                                             '
  169.                                 %}
  170.                                 {% set avis2 =
  171.                                     '<svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  172.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  173.                                                                 class="iconify iconify--ic" width="17" height="17"
  174.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  175.                                                                 <path fill="currentColor"
  176.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  177.                                                                 </path>
  178.                                                             </svg>
  179.                                                             <svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  180.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  181.                                                                 class="iconify iconify--ic" width="17" height="17"
  182.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  183.                                                                 <path fill="currentColor"
  184.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  185.                                                                 </path>
  186.                                                             </svg>
  187.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  188.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  189.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  190.                                                             '
  191.                                 %}
  192.                                 {% set avis1 =
  193.                                     '<svg style="color: rgb(255, 187, 0);" xmlns="http://www.w3.org/2000/svg"
  194.                                                                 xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img"
  195.                                                                 class="iconify iconify--ic" width="17" height="17"
  196.                                                                 preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  197.                                                                 <path fill="currentColor"
  198.                                                                     d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27z">
  199.                                                                 </path>
  200.                                                             </svg>
  201.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  202.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  203.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  204.                                                             <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path fill="currentColor" d="m22 9.24l-7.19-.62L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21L12 17.27L18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27l1-4.28l-3.32-2.88l4.38-.38L12 6.1l1.71 4.04l4.38.38l-3.32 2.88l1 4.28L12 15.4z"/></svg>
  205.                                                             '
  206.                                 %}
  207.                                 {% if avis.eval == 5 %}
  208.                                     {{ avis5|raw }}
  209.                                 {% elseif avis.eval == 4 %}
  210.                                     {{ avis4|raw }}
  211.                                 {% elseif avis.eval == 3 %}
  212.                                     {{ avis3|raw }}
  213.                                 {% elseif avis.eval == 2 %}
  214.                                     {{ avis2|raw }}
  215.                                 {% elseif avis.eval == 1 %}
  216.                                     {{ avis1|raw }}
  217.                                 {% endif %}
  218.                                 <span class="text-xxsmall">
  219.                                     {{ avis.createdAt|ago }}
  220.                                 </span>
  221.                                 <p class="mt-3">
  222.                                     {{ avis.content|replace({'<div>': '', '</div>': '', '<span style="font-size:14px">': '<span style="font-size: 0.9rem;"', '</span>': '',})|raw }}
  223.                                 </p>
  224.                             </div>
  225.                         </div>
  226.                     </div>
  227.                 {% endfor %}
  228.               </div>
  229.         </div>
  230.     </div>
  231. </section>
  232. {% endblock %}