templates/include/header-clients.html.twig line 1

Open in your IDE?
  1. {% if app.user and app.user.availableCustomers %}
  2.     <li class="nav-item dropdown no-arrow">
  3.         <a class="nav-link dropdown-toggle" href="#" id="clientsDropdown" role="button"
  4.            data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  5.             <span class="mr-2 d-none d-lg-inline text-gray-600 small">
  6.                 Mes sociétés
  7.             </span>
  8.         </a>
  9.         <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in keep-open"
  10.              aria-labelledby="clientsDropdown">
  11.             <div id="header-clients">
  12.                 <div class="d-flex align-items-center">
  13.                     <h4>Liste de mes sociétés</h4>
  14.                     <p class="h5">
  15.                         <span class="ml-3 number-customers badge badge-main-color text-white">
  16.                             {{ app.user.availableCustomers|length }}
  17.                         </span>
  18.                     </p>
  19.                 </div>
  20.                 <select class="multiple-clients" name="clients[]" multiple="multiple">
  21.                     {% for customer in app.user.availableCustomers %}
  22.                         <option value="{{ customer.code }}" {% if customer in app.user.customers %} selected {% endif %}>
  23.                             {{ customer.label }}
  24.                         </option>
  25.                     {% endfor %}
  26.                 </select>
  27.                 <p class="mb-0 mt-2 d-flex justify-content-end">
  28.                    <span class="btn-group">
  29.                         <button class="btn btn-outline-secondary btn-sm all-customers">Tous</button>
  30.                         <button class="btn btn-outline-secondary btn-sm clear-customers">Aucun</button>
  31.                    </span>
  32.                    <button class="btn btn-primary btn-sm ml-3 submit-customers">Valider</button>
  33.                 </p>
  34.             </div>
  35.         </div>
  36.     </li>
  37. {% endif %}