up templates

This commit is contained in:
Tykayn 2025-02-09 16:39:38 +01:00 committed by tykayn
parent 71bce538af
commit a39b6239b0
71 changed files with 1536 additions and 262 deletions

79
templates/product/index.html.twig Executable file → Normal file
View file

@ -1,74 +1,39 @@
{% extends 'base.html.twig' %}
{% block title %}Product index{% endblock %}
{% block body %}
<div class="row heading-of-list">
<div class="col-xs-6">
<h1>Produits</h1></div>
<div class="col-xs-6">
<h1>Product index</h1>
<a class="btn btn-primary pull-right" href="{{ path('product_new') }}">Nouveau produit</a>
<span class="hint alert alert-info pull-right">
astuce: Utilisez
<strong>
<a href="{{ path('import') }}">
l'import de masse
</a>
</strong>
pour créer plusieurs produits et catégories à la fois
</span>
</div>
</div>
<table class="table-responsive table-striped table table-bordered table-light">
<thead class="bg-dark">
<tr>
<th>Id</th>
<th>Category</th>
<th>Name</th>
<th>Image</th>
<th>Price</th>
<th>Stocks</th>
<th>Vendus</th>
<th>Comment</th>
<th>Actions</th>
</tr>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Price</th>
<th>Stock</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for product in products %}
<tr>
<td>
<a class="btn btn-primary btn-block"
href="{{ path('product_show', { 'id': product.id }) }}">{{ product.id }}</a>
</td>
<td>
<a class="btn btn-primary btn-block"
href="{{ path('productcategory_edit', { 'id': product.category.id }) }}">
{{ product.category.name }}
</a>
</td>
<td>
<a class="btn btn-default btn-block" href="{{ path('product_edit', { 'id': product.id }) }}">
{{ product.name }}
</a>
</td>
<td>{{ product.image }}</td>
<td>{{ product.id }}</td>
<td>{{ product.name }}</td>
<td>{{ product.price }}</td>
<td>{{ product.stockCount }}</td>
<td>{{ product.productsSold | length }}</td>
<td>{{ product.comment }}</td>
<td>{{ product.stock }}</td>
<td>
<a class="btn btn-default" href="{{ path('product_edit', { 'id': product.id }) }}">
<i class="fa fa-pencil"></i>
</a>
<a href="{{ path('app_product_show', {'id': product.id}) }}">show</a>
<a href="{{ path('app_product_edit', {'id': product.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a class="btn btn-primary" href="{{ path('product_new') }}">Nouveau produit</a>
<a href="{{ path('app_product_new') }}">Create new</a>
{% endblock %}