templates/app/colleague/index.html.twig line 1
{% extends 'app/index.html.twig' %} {% block title %} {% trans %} Collègues
liste{% endtrans %} {% endblock %} {% block content %} {% include
"app/_partials/breadcrumb.html.twig" with { 'title': 'Collègues'|trans,
'parent': 'Collègues'|trans } %}
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<div class="row align-items-center">
<div class="col-md-6">
<div class="mb-3">
<h5 class="card-title">
{% trans %} Tous les collègues {% endtrans %}
<span class="text-muted fw-normal ms-2"
>({{ colleagues | length }})</span
>
</h5>
</div>
</div>
<div class="col-md-6">
<div
class="d-flex flex-wrap align-items-center justify-content-end gap-2 mb-3"
>
<div>
<ul class="nav nav-pills"></ul>
</div>
<div>
<a
href="{{ path('app_colleague_new') }}"
class="btn btn-primary"
data-bs-toggle="modal"
data-bs-target="#add-modal"
>
<i class="bx bx-plus me-1"></i>
{% trans %} Ajouter un nouveau {% endtrans %}
</a>
</div>
{% include "app/colleague/add-modal.html.twig" %} {% include
"app/colleague/edit-modal.html.twig" %}
</div>
</div>
</div>
</div>
<div class="card-body">
<div class="table">
<table
id="datatable"
class="table table-bordered dt-responsive nowrap w-100"
>
<thead>
<tr>
<th>#</th>
<th>{% trans %} Nom Complet {% endtrans %}</th>
<th>{% trans %} Email {% endtrans %}</th>
<th>{% trans %} Téléphone / Mobile {% endtrans %}</th>
<th>{% trans %} Emploi {% endtrans %}</th>
<th width="220px">{% trans %} Actions {% endtrans %}</th>
</tr>
</thead>
<tbody data-controller="colleague">
{% for colleague in colleagues %}
<tr>
<th scope="row">
{{ loop.index }}
</th>
<td>
<div class="d-flex align-items-center">
<div class="flex-shrink-0 me-3">
<img
class="rounded-circle avatar-md"
src="{{ colleague.photo ? '/uploads/colleagues/' ~ colleague.photo : '/front/images/colleague.png' }}"
alt="{{ colleague.firstName }} {{ colleague.lastName }}"
/>
</div>
<div class="flex-grow-1">
<a
href="{{
path('app_colleague_edit', { id: colleague.id })
}}"
>
<h5 class="font-size-14 mb-0">
{{ colleague.firstName }}
{{ colleague.lastName }}
</h5>
</a>
</div>
</div>
</td>
<td>
{{ colleague.email }}
</td>
<td>{{ colleague.phone }} / {{ colleague.mobile }}</td>
<td>
{{ colleague.job }}
</td>
<td>
<a
href="{{
path('app_colleague_edit', { id: colleague.id })
}}"
class="btn btn-primary waves-effect waves-light me-2"
data-toggle="tooltip"
data-placement="top"
title="{{ 'Profile' | trans }}"
>
<i class="bx bx-user font-size-16 align-middle"></i>
</a>
<a
data-action="colleague#edit"
data-colleague-id="{{ colleague.id }}"
href="javascript:void(0)"
class="btn btn-info waves-effect waves-light me-2"
data-toggle="tooltip"
data-placement="top"
title="{{ 'Edit' | trans }}"
>
<i class="bx bx-edit font-size-16 align-middle"></i>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
{% endblock %}