gestioCOF/kfet/templates/kfet/article.html
Aurélien Delobelle 8c6d56b27c Add Wagtail CMS for kfet app.
K-Fêt
- Integrate wagtail to serve "static" pages of old K-Fêt website
- Fixture "kfetcms/kfet_wagtail_17_05" contains a copy of old website
(as in May 2017).
- Media files can be got until end of June 17 at
http://partage.eleves.ens.fr//files/604e6dea2ceebc66b1936c6b3f911744/kfet_media.tar.gz

Login/logout
- Update package django_cas_ng to last version.
- Clean COFCASBackend.
- Change CAS version to 3 (version used on eleves.ens). This enables
the logout redirection (for CAS ofc).
- Add messages and clean existing ones on login/logout (for both
outsider and cas users).

Misc
- Update settings to bypass an incompability between debug-toolbar and
wagtailmenus packages.
- Better management of dev/test-specific urls (if debug-toolbar wasn't in
INSTALLED_APPS, media files were not served).
- UI improvements.
2017-05-30 20:44:30 +02:00

68 lines
2 KiB
HTML

{% extends 'kfet/base_col_2.html' %}
{% block title %}Articles{% endblock %}
{% block header-title %}Articles{% endblock %}
{% block fixed-content %}
<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 btn-group btn-group-justified">
<div class="btn-group">
<a class="btn btn-primary btn-lg" href="{% url 'kfet.article.create' %}">
<span class="glyphicon glyphicon-plus"></span>
<span>Nouvel article</span>
</a>
</div>
<div class="btn-group">
<a class="btn btn-primary btn-lg" href="{% url 'kfet.category' %}">
Catégories
</a>
</div>
</div>
{% endblock %}
{% block main-content %}
<div class="content-right-block">
<h2>Liste des articles</h2>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<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">
<td colspan="6">{{ article.category.name }}</td>
</tr>
{% endifchanged %}
<tr>
<td>
<a href="{% url 'kfet.article.read' article.pk %}">
{{ article.name }}
</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>
</div>
</div>
{% endblock %}