3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-10 20:06:26 +00:00
coope/gestion/templates/gestion/menus_list.html
2019-01-17 23:16:43 +01:00

41 lines
1.4 KiB
HTML

{% extends 'base.html' %}
{% block entete %}Gestion des produits{% endblock %}
{% block navbar%}
<ul>
<li><a href="#first">Liste des menus</a></li>
</ul>
{% endblock %}
{% block content %}
<section id="first" class="main">
<header class="major">
<h2>Liste des menus</h2>
</header>
<a class="button" href="{% url 'gestion:addMenu' %}"><i class="fa fa-plus-square"></i> Créer un menu</a><br><br>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Nom</th>
<th>Prix</th>
<th>Code barre</th>
<th>Produits</th>
<th>Actif</th>
<th>Administrer</th>
</tr>
</thead>
<tbody>
{% for menu in menus %}
<tr>
<td>{{ menu.name }}</td>
<td>{{ menu.amount}} €</td>
<td>{{ menu.barcode }}</td>
<td>{% for art in menu.articles.all %}<a href="{% url 'gestion:productProfile' art.pk %}">{{art}}</a>,{% endfor %}</td>
<td>{{ menu.is_active | yesno:"Oui, Non"}}</td>
<td>{% if perms.gestion.change_menu %}<a href="{% url 'gestion:switchActivateMenu' menu.pk %}" class="button small">{% if menu.is_active %}<i class="fa fa-times-cirlce"></i> Désa{% else %}<i class="fa fa-check-circle"></i> A{% endif %}ctiver</a> <a href="{% url 'gestion:editMenu' menu.pk %}" class="button small"><i class="fa fa-pencil-alt"></i> Modifier</a>{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endblock %}