2017-05-20 13:57:21 +02:00
|
|
|
{% extends 'kfet/base_col_2.html' %}
|
2016-08-04 08:23:34 +02:00
|
|
|
|
2016-08-12 10:03:39 +02:00
|
|
|
{% block title %}Articles{% endblock %}
|
2017-05-20 13:57:21 +02:00
|
|
|
{% block header-title %}Articles{% endblock %}
|
2016-08-04 08:23:34 +02:00
|
|
|
|
2017-05-20 13:57:21 +02:00
|
|
|
{% block fixed-content %}
|
2016-08-04 08:23:34 +02:00
|
|
|
|
2017-05-20 13:57:21 +02:00
|
|
|
<div class="content-left-top">
|
|
|
|
<div class="line line-big">{{ articles|length }}</div>
|
|
|
|
<div class="line line-bigsub">article{{ articles|length|pluralize }}</div>
|
|
|
|
</div>
|
2017-05-30 20:44:30 +02:00
|
|
|
<div class="buttons btn-group btn-group-justified">
|
|
|
|
<div class="btn-group">
|
2017-05-20 13:57:21 +02:00
|
|
|
<a class="btn btn-primary btn-lg" href="{% url 'kfet.article.create' %}">
|
2017-05-30 20:44:30 +02:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
<span>Nouvel article</span>
|
2017-05-20 13:57:21 +02:00
|
|
|
</a>
|
2017-05-30 20:44:30 +02:00
|
|
|
</div>
|
|
|
|
<div class="btn-group">
|
2017-05-20 13:57:21 +02:00
|
|
|
<a class="btn btn-primary btn-lg" href="{% url 'kfet.category' %}">
|
|
|
|
Catégories
|
|
|
|
</a>
|
2017-05-30 20:44:30 +02:00
|
|
|
</div>
|
2017-05-20 13:57:21 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block main-content %}
|
|
|
|
<div class="content-right-block">
|
|
|
|
<h2>Liste des articles</h2>
|
|
|
|
<div class="table-responsive">
|
2017-05-30 20:44:30 +02:00
|
|
|
<table class="table table-hover table-condensed">
|
2017-05-20 13:57:21 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td>Nom</td>
|
|
|
|
<td class="text-right">Prix</td>
|
|
|
|
<td class="text-right">Stock</td>
|
|
|
|
<td class="text-right">En vente</td>
|
|
|
|
<td class="text-right">Affiché</td>
|
|
|
|
<td class="text-right">Dernier inventaire</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for article in articles %}
|
|
|
|
{% ifchanged article.category %}
|
|
|
|
<tr class="section">
|
2017-05-30 20:44:30 +02:00
|
|
|
<td colspan="6">{{ article.category.name }}</td>
|
2017-05-20 13:57:21 +02:00
|
|
|
</tr>
|
|
|
|
{% endifchanged %}
|
|
|
|
<tr>
|
2017-05-30 20:44:30 +02:00
|
|
|
<td>
|
2017-05-20 13:57:21 +02:00
|
|
|
<a href="{% url 'kfet.article.read' article.pk %}">
|
2017-05-30 20:44:30 +02:00
|
|
|
{{ article.name }}
|
2017-05-20 13:57:21 +02:00
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="text-right">{{ article.price }}€</td>
|
|
|
|
<td class="text-right">{{ article.stock }}</td>
|
|
|
|
<td class="text-right">{{ article.is_sold | yesno:"En vente,Non vendu"}}</td>
|
|
|
|
<td class="text-right">{{ article.hidden | yesno:"Caché,Affiché" }}</td>
|
|
|
|
<td class="text-right">{{ article.inventory.0.at }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2016-08-12 10:03:39 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-04 08:23:34 +02:00
|
|
|
|
|
|
|
{% endblock %}
|