3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-05-18 07:21:47 +00:00
coope/gestion/templates/gestion/kegs_list.html
2019-06-23 16:43:23 +02:00

102 lines
3.4 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends 'base.html' %}
{% block entete %}Gestion des produits{% endblock %}
{% block navbar%}
<ul>
<li><a href="#first">Liste des fûts actifs</a></li>
<li><a href="#second">Liste des fûts inactifs</a></li>
</ul>
{% endblock %}
{% block content %}
<section id="first" class="main">
<header class="major">
<h2>Liste des fûts actifs</h2>
</header>
{% if perms.gestion.add_keg %}
<a class="button" href="{% url 'gestion:addKeg' %}"><i class="fa fa-plus-square"></i> Créer un fût</a>
{% endif %}
{% if perms.gestion.open_keg %}
<a class="button" href="{% url 'gestion:openKeg' %}"><i class="fa fa-fill-drip"></i> Percuter un fût</a>
{% endif %}
{% if perms.gestion.close_keg %}
<a class="button" href="{% url 'gestion:closeKeg' %}"><i class="fa fa-fill"></i> Fermer un fût</a>
{% endif %}
<br><br>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Nom</th>
<th>Stock en soute</th>
<th>Capacité</th>
<th>Quantité vendue</th>
<th>Montant vendu</th>
<th>Prix du fût</th>
<th>Degré</th>
<th>Historique</th>
<th>Administrer</th>
</tr>
</thead>
<tbody>
{% for kegH in kegs_active %}
<tr>
<td>{{ kegH.keg.name }}</td>
<td>{{ kegH.keg.stockHold}}</td>
<td>{{ kegH.keg.capacity }} L</td>
<td>{{ kegH.quantitySold }} L</td>
<td>{{ kegH.amountSold }} €</td>
<td>{{ kegH.keg.amount }} €</td>
<td>{{ kegH.keg.pinte.deg }}°</td>
<td><a href="{% url 'gestion:kegH' kegH.keg.pk %}">Voir</a></td>
<td>{% if perms.gestion.close_keg %}<a href="{% url 'gestion:closeDirectKeg' kegH.keg.pk %}" class="button small"><i class="fa fa-fill"></i> Fermer</a> {% endif %}{% if perms.gestion.change_keg %}<a href="{% url 'gestion:editKeg' kegH.keg.pk %}" class="button small"><i class="fa fa-pencil-alt"></i> Modifier</a>{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
<section id="first" class="main">
<header class="major">
<h2>Liste des fûts inactifs</h2>
</header>
{% if perms.gestion.add_keg %}
<a class="button" href="{% url 'gestion:addKeg' %}"><i class="fa fa-plus-square"></i> Créer un fût</a>
{% endif %}
{% if perms.gestion.open_keg %}
<a class="button" href="{% url 'gestion:openKeg' %}"><i class="fa fa-fill-drip"></i> Percuter un fût</a>
{% endif %}
{% if perms.gestion.close_keg %}
<a class="button" href="{% url 'gestion:closeKeg' %}"><i class="fa fa-fill"></i> Fermer un fût</a>
{% endif %}
<br><br>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Nom</th>
<th>Stock en soute</th>
<th>Capacité</th>
<th>Prix du fût</th>
<th>Degré</th>
<th>Historique</th>
<th>Administrer</th>
</tr>
</thead>
<tbody>
{% for keg in kegs_inactive %}
<tr>
<td>{{ keg.name }}</td>
<td>{{ keg.stockHold}}</td>
<td>{{ keg.capacity }} L</td>
<td>{{ keg.amount }} €</td>
<td>{{ keg.pinte.deg }}°</td>
<td><a href="{% url 'gestion:kegH' keg.pk %}">Voir</a></td>
<td>{% if perms.gestion.open_keg %}{% if keg.stockHold > 0 %}<a href="{% url 'gestion:openDirectKeg' keg.pk %}" class="button small"><i class="fa fa-fill-drip"></i> Percuter</a> {% endif %}{% endif %}{% if perms.gestion.change_keg %}<a href="{% url 'gestion:editKeg' keg.pk %}" class="button small"><i class="fa fa-pencil-alt"></i> Modifier</a>{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endblock %}