templates/data/products.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}VOIR LES PRODUITS{% endblock %}
  3. {% block body %}
  4.     <div class="container w-50 mx-auto my-5">
  5.         <h1 class="bg-primary mt-5 mb-0 py-2 text-center">VOIR LES PRODUCTS ACTUELS :</h1>
  6.         <a href="{{ path('app_dataHome')}}" class="btn btn-primary mt-3">Retour</a>
  7.         <table class="table table-striped table-hover text-left my-5">
  8.             <thead>
  9.                 <tr class="bg-secondary">
  10.                     <th scope="col" class="text-center">Id</th>
  11.                     <th scope="col" class="text-center">Nom</th>
  12.                     <th scope="col" class="text-center">Description</th>
  13.                     <th scope="col" class="text-center">Prix</th>
  14.                     <th scope="col" class="text-center">Stock</th>
  15.                     <th scope="col" class="text-center">Lien 3D</th>
  16.                 </tr>
  17.             </thead>
  18.             <tbody>
  19.             {% for product in products %}
  20.                 <tr>
  21.                     <th scope="row" class="text-center">{{ product.getId() }}</th>
  22.                     <td class="text-center">{{ product.getNom() }}</td>
  23.                     <td class="text-center">{{ product.getDescription() }}</td>
  24.                     <td class="text-center">{{ product.getPrix() }}</td>
  25.                     <td class="text-center">{{ product.getQteStock() }}</td>
  26.                     <td class="text-center">{{ product.getImage() }}</td>
  27.                 </tr>
  28.             {% endfor %}
  29.             </tbody>            
  30.         </table>       
  31.     </div>
  32. {% endblock %}