templates/entreprise/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Liste des entreprises{% endblock %}
  3. {% block body %}
  4. <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css">
  5. <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
  6. <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js"></script>
  7. {{ include('_header.html.twig') }}
  8.     <div class="container mt-5">
  9.         <div class="row">
  10.             <a type="button" href="{{path('app_entreprise_add')}}" class="btn btn-success">Ajouter</a>
  11.         </div>
  12.         <div class="row mt-4">
  13.             <table id="entreprises" class="text-center table table-light table-bordered table-striped" style="width:100%">
  14.                 <thead>
  15.                     <tr class="bg-dark">
  16.                         <th>Raison Sociale</th>
  17.                         <th style="width:10em">Ville</th>
  18.                         <th style="width:7em">SIRET</th>
  19.                         <th style="width:7em">Client</th>
  20.                         <th style="width:7em">Utilisateur</th>
  21.                         <th style="width:5em">Action</th>
  22.                     </tr>
  23.                 </thead>
  24.             </table>
  25.         </div>
  26.     </div>
  27. {{ include('_footer.html.twig') }}
  28. {% endblock %}
  29. {% block javascripts %}
  30.     <script>
  31.         var entreprises = $("#entreprises").DataTable({
  32.             data:{{entreprises|json_encode|raw}},
  33.             "language": {
  34.                 "url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/French.json"
  35.             }
  36.         });
  37.     </script>
  38. {% endblock %}