3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-05-17 06:05:32 +00:00
coope/gestion/templates/gestion/products_list.html

50 lines
1.5 KiB
HTML

{% extends 'base.html' %}
{% block entete %}<h1>Gestion des produits</h1>{% endblock %}
{% block navbar%}
<ul>
<li><a href="#first">Liste des produits</a></li>
</ul>
{% endblock %}
{% block content %}
<section id="first" class="main">
<header class="major">
<h2>Liste des produits</h2>
</header>
<a class="button" href="{% url 'gestion:addProduct' %}">Créer un produit</a><br><br>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Nom</th>
<th>Prix</th>
<th>Stock (soute)</th>
<th>Stock (bar)</th>
<th>Code barre</th>
<th>Catégorie</th>
<th>Actif</th>
<th>Degré</th>
<th>Volume</th>
<th>Administrer</th>
</tr>
</thead>
<tbody>
{% for product in products %}
<tr>
<td>{{ product.name }}</td>
<td>{{ product.amount}}</td>
<td>{{ product.stockHold }}</td>
<td>{{ product.stockBar }}</td>
<td>{{ product.barcode }}</td>
<td>{{ product.category }}</td>
<td>{{ product.is_active | yesno:"Oui, Non"}}</td>
<td>{{ product.deg }}</td>
<td>{{ product.volume }} cl</td>
<td><a href="{% url 'gestion:productProfile' product.pk %}" class="button small">Profil</a> <a href="{% url 'gestion:switchActivate' product.pk %}" class="button small">{% if product.is_active %}Désa{% else %}A{% endif %}ctiver</a> <a href="{% url 'gestion:editProduct' product.pk %}" class="button small">Modifier</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endblock %}