kpsul/kfet/templates/kfet/article.html

73 lines
2.5 KiB
HTML
Raw Normal View History

{% extends 'kfet/base.html' %}
{% block title %}Articles{% endblock %}
{% block content-header-title %}Articles{% endblock %}
{% block content %}
<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>
<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>
<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">
<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>
<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>
</div>
</div>
</div>
{% endblock %}