{% extends 'base.html.twig' %}
{% block title %}Liste des entreprises{% endblock %}
{% block body %}
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js"></script>
{{ include('_header.html.twig') }}
<div class="container mt-5">
<div class="row">
<a type="button" href="{{path('app_entreprise_add')}}" class="btn btn-success">Ajouter</a>
</div>
<div class="row mt-4">
<table id="entreprises" class="text-center table table-light table-bordered table-striped" style="width:100%">
<thead>
<tr class="bg-dark">
<th>Raison Sociale</th>
<th style="width:10em">Ville</th>
<th style="width:7em">SIRET</th>
<th style="width:7em">Client</th>
<th style="width:7em">Utilisateur</th>
<th style="width:5em">Action</th>
</tr>
</thead>
</table>
</div>
</div>
{{ include('_footer.html.twig') }}
{% endblock %}
{% block javascripts %}
<script>
var entreprises = $("#entreprises").DataTable({
data:{{entreprises|json_encode|raw}},
"language": {
"url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/French.json"
}
});
</script>
{% endblock %}