templates/app/colleague/index.html.twig line 1

  1. {% extends 'app/index.html.twig' %} {% block title %} {% trans %} Collègues
  2. liste{% endtrans %} {% endblock %} {% block content %} {% include
  3. "app/_partials/breadcrumb.html.twig" with { 'title': 'Collègues'|trans,
  4. 'parent': 'Collègues'|trans } %}
  5. <div class="row">
  6.   <div class="col-12">
  7.     <div class="card">
  8.       <div class="card-header">
  9.         <div class="row align-items-center">
  10.           <div class="col-md-6">
  11.             <div class="mb-3">
  12.               <h5 class="card-title">
  13.                 {% trans %} Tous les collègues {% endtrans %}
  14.                 <span class="text-muted fw-normal ms-2"
  15.                   >({{ colleagues | length }})</span
  16.                 >
  17.               </h5>
  18.             </div>
  19.           </div>
  20.           <div class="col-md-6">
  21.             <div
  22.               class="d-flex flex-wrap align-items-center justify-content-end gap-2 mb-3"
  23.             >
  24.               <div>
  25.                 <ul class="nav nav-pills"></ul>
  26.               </div>
  27.               <div>
  28.                 <a
  29.                   href="{{ path('app_colleague_new') }}"
  30.                   class="btn btn-primary"
  31.                   data-bs-toggle="modal"
  32.                   data-bs-target="#add-modal"
  33.                 >
  34.                   <i class="bx bx-plus me-1"></i>
  35.                   {% trans %} Ajouter un nouveau {% endtrans %}
  36.                 </a>
  37.               </div>
  38.               {% include "app/colleague/add-modal.html.twig" %} {% include
  39.               "app/colleague/edit-modal.html.twig" %}
  40.             </div>
  41.           </div>
  42.         </div>
  43.       </div>
  44.       <div class="card-body">
  45.         <div class="table">
  46.           <table
  47.             id="datatable"
  48.             class="table table-bordered dt-responsive nowrap w-100"
  49.           >
  50.             <thead>
  51.               <tr>
  52.                 <th>#</th>
  53.                 <th>{% trans %} Nom Complet {% endtrans %}</th>
  54.                 <th>{% trans %} Email {% endtrans %}</th>
  55.                 <th>{% trans %} Téléphone / Mobile {% endtrans %}</th>
  56.                 <th>{% trans %} Emploi {% endtrans %}</th>
  57.                 <th width="220px">{% trans %} Actions {% endtrans %}</th>
  58.               </tr>
  59.             </thead>
  60.             <tbody data-controller="colleague">
  61.               {% for colleague in colleagues %}
  62.               <tr>
  63.                 <th scope="row">
  64.                   {{ loop.index }}
  65.                 </th>
  66.                 <td>
  67.                   <div class="d-flex align-items-center">
  68.                     <div class="flex-shrink-0 me-3">
  69.                       <img
  70.                         class="rounded-circle avatar-md"
  71.                         src="{{ colleague.photo ? '/uploads/colleagues/' ~ colleague.photo : '/front/images/colleague.png' }}"
  72.                         alt="{{ colleague.firstName }} {{ colleague.lastName }}"
  73.                       />
  74.                     </div>
  75.                     <div class="flex-grow-1">
  76.                       <a
  77.                         href="{{
  78.                           path('app_colleague_edit', { id: colleague.id })
  79.                         }}"
  80.                       >
  81.                         <h5 class="font-size-14 mb-0">
  82.                           {{ colleague.firstName }}
  83.                           {{ colleague.lastName }}
  84.                         </h5>
  85.                       </a>
  86.                     </div>
  87.                   </div>
  88.                 </td>
  89.                 <td>
  90.                   {{ colleague.email }}
  91.                 </td>
  92.                 <td>{{ colleague.phone }} / {{ colleague.mobile }}</td>
  93.                 <td>
  94.                   {{ colleague.job }}
  95.                 </td>
  96.                 <td>
  97.                   <a
  98.                     href="{{
  99.                       path('app_colleague_edit', { id: colleague.id })
  100.                     }}"
  101.                     class="btn btn-primary waves-effect waves-light me-2"
  102.                     data-toggle="tooltip"
  103.                     data-placement="top"
  104.                     title="{{ 'Profile' | trans }}"
  105.                   >
  106.                     <i class="bx bx-user font-size-16 align-middle"></i>
  107.                   </a>
  108.                   <a
  109.                     data-action="colleague#edit"
  110.                     data-colleague-id="{{ colleague.id }}"
  111.                     href="javascript:void(0)"
  112.                     class="btn btn-info waves-effect waves-light me-2"
  113.                     data-toggle="tooltip"
  114.                     data-placement="top"
  115.                     title="{{ 'Edit' | trans }}"
  116.                   >
  117.                     <i class="bx bx-edit font-size-16 align-middle"></i>
  118.                   </a>
  119.                 </td>
  120.               </tr>
  121.               {% endfor %}
  122.             </tbody>
  123.           </table>
  124.         </div>
  125.       </div>
  126.     </div>
  127.   </div>
  128. </div>
  129. {% endblock %}