2016-08-04 08:23:34 +02:00
|
|
|
{% extends 'kfet/base.html' %}
|
|
|
|
|
2016-08-12 10:03:39 +02:00
|
|
|
{% block title %}Articles{% endblock %}
|
|
|
|
{% block content-header-title %}Articles{% endblock %}
|
2016-08-04 08:23:34 +02:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2016-08-12 10:03:39 +02:00
|
|
|
<div class="row">
|
2016-08-30 18:16:57 +02:00
|
|
|
<div class="col-sm-4 col-md-3 col-content-left">
|
|
|
|
<div class="content-left">
|
|
|
|
<div class="content-left-top">
|
|
|
|
<div class="line line-big">{{ articles|length }}</div>
|
|
|
|
<div class="line line-bigsub">article{{ articles|length|pluralize }}</div>
|
|
|
|
</div>
|
|
|
|
<div class="buttons">
|
|
|
|
<a class="btn btn-primary btn-lg" href="{% url 'kfet.article.create' %}">
|
|
|
|
Nouvel article
|
|
|
|
</a>
|
2017-04-05 15:34:28 +02:00
|
|
|
<a class="btn btn-primary btn-lg" href="{% url 'kfet.category' %}">
|
|
|
|
Catégories
|
|
|
|
</a>
|
2016-08-30 18:16:57 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-8 col-md-9 col-content-right">
|
|
|
|
{% include 'kfet/base_messages.html' %}
|
|
|
|
<div class="content-right">
|
|
|
|
<div class="content-right-block">
|
|
|
|
<h2>Liste des articles</h2>
|
2016-08-30 20:32:00 +02:00
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-condensed">
|
2016-08-30 18:16:57 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td></td>
|
|
|
|
<td>Nom</td>
|
2016-08-30 20:32:00 +02:00
|
|
|
<td class="text-right">Prix</td>
|
|
|
|
<td class="text-right">Stock</td>
|
|
|
|
<td class="text-right">En vente</td>
|
2017-03-06 01:58:33 +01:00
|
|
|
<td class="text-right">Affiché</td>
|
2016-08-30 20:32:00 +02:00
|
|
|
<td class="text-right">Dernier inventaire</td>
|
2016-08-30 18:16:57 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for article in articles %}
|
|
|
|
{% ifchanged article.category %}
|
2016-08-30 20:32:00 +02:00
|
|
|
<tr class="section">
|
2017-03-06 01:58:33 +01:00
|
|
|
<td colspan="7">{{ article.category.name }}</td>
|
2016-08-30 18:16:57 +02:00
|
|
|
</tr>
|
|
|
|
{% endifchanged %}
|
|
|
|
<tr>
|
2016-08-30 20:32:00 +02:00
|
|
|
<td class="text-center">
|
2016-08-30 18:16:57 +02:00
|
|
|
<a href="{% url 'kfet.article.read' article.pk %}">
|
|
|
|
<span class="glyphicon glyphicon-cog"></span>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>{{ article.name }}</td>
|
2016-08-30 20:32:00 +02:00
|
|
|
<td class="text-right">{{ article.price }}€</td>
|
|
|
|
<td class="text-right">{{ article.stock }}</td>
|
2017-03-06 02:03:19 +01:00
|
|
|
<td class="text-right">{{ article.is_sold | yesno:"En vente,Non vendu"}}</td>
|
2017-03-06 01:58:33 +01:00
|
|
|
<td class="text-right">{{ article.hidden | yesno:"Caché,Affiché" }}</td>
|
2016-08-30 20:32:00 +02:00
|
|
|
<td class="text-right">{{ article.inventory.0.at }}</td>
|
2016-08-30 18:16:57 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-12 10:03:39 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-04 08:23:34 +02:00
|
|
|
|
|
|
|
{% endblock %}
|