mirror of https://github.com/nanoy42/coope
9 changed files with 274 additions and 11 deletions
@ -0,0 +1,21 @@ |
|||
# Generated by Django 2.1 on 2018-11-30 18:04 |
|||
|
|||
from django.db import migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('gestion', '0007_auto_20181127_0902'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RemoveField( |
|||
model_name='consumptionhistory', |
|||
name='menu', |
|||
), |
|||
migrations.RemoveField( |
|||
model_name='historicalconsumptionhistory', |
|||
name='menu', |
|||
), |
|||
] |
|||
@ -0,0 +1,61 @@ |
|||
{% extends "base.html" %} |
|||
{% load static %} |
|||
{% block entete %}<h1>Consommations</h1>{%endblock%} |
|||
|
|||
{% block navbar %} |
|||
<ul> |
|||
<li><a href="#first">Consommations ({{user}})</a></li> |
|||
</ul> |
|||
{% endblock %} |
|||
{% block content %} |
|||
<section id="first" class="main special"> |
|||
<header class="major"> |
|||
<h2>Consommations ({{user}})</h2> |
|||
</header> |
|||
<section id="rechargements"> |
|||
<div class="table-wrapper"> |
|||
<table> |
|||
<thead id="headTransaction"> |
|||
<tr> |
|||
<th>Produit</th> |
|||
<th>Quantité</th> |
|||
<th>Montant</th> |
|||
<th>Type de Paiement</th> |
|||
<th>Date</th> |
|||
<th>Annuler</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody id="bodyTransaction"> |
|||
{% for c in consumptions %} |
|||
<tr> |
|||
<td>{{c.product}}</td> |
|||
<td>{{c.quantity}}</td> |
|||
<td>{{c.amount}}</td> |
|||
<td>{{c.paymentMethod}}</td> |
|||
<td>{{c.date}}</td> |
|||
<td><a href="{% url 'gestion:cancelConsumption' c.pk %}" class="button small">Annuler</a></td> |
|||
</tr> |
|||
{%endfor%} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="pagination special"> |
|||
<span class="step-links"> |
|||
{% if consumptions.has_previous %} |
|||
<a href="{% url 'users:allConsumptions' user.pk 1 %}">« Première </a> |
|||
<a href="{% url 'users:allConsumptions' user.pk consumptions.previous_page_number %}"> Précédente </a> |
|||
{% endif %} |
|||
|
|||
<span class="current"> |
|||
Page {{ consumptions.number }} sur {{ consumptions.paginator.num_pages }}. |
|||
</span> |
|||
|
|||
{% if consumptions.has_next %} |
|||
<a href="{% url 'users:allConsumptions' user.pk consumptions.next_page_number %}"> Suivante </a> |
|||
<a href="{% url 'users:allConsumptions' user.pk consumptions.paginator.num_pages %}"> Dernière »</a> |
|||
{% endif %} |
|||
</span> |
|||
</div> |
|||
</section> |
|||
</section> |
|||
{%endblock%} |
|||
@ -0,0 +1,61 @@ |
|||
{% extends "base.html" %} |
|||
{% load static %} |
|||
{% block entete %}<h1>Menus</h1>{%endblock%} |
|||
|
|||
{% block navbar %} |
|||
<ul> |
|||
<li><a href="#first">Consommations de menus ({{user}})</a></li> |
|||
</ul> |
|||
{% endblock %} |
|||
{% block content %} |
|||
<section id="first" class="main special"> |
|||
<header class="major"> |
|||
<h2>Consommations de menus ({{user}})</h2> |
|||
</header> |
|||
<section id="rechargements"> |
|||
<div class="table-wrapper"> |
|||
<table> |
|||
<thead id="headTransaction"> |
|||
<tr> |
|||
<th>Menu</th> |
|||
<th>Quantité</th> |
|||
<th>Montant</th> |
|||
<th>Type de Paiement</th> |
|||
<th>Date</th> |
|||
<th>Annuler</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody id="bodyTransaction"> |
|||
{% for m in menus %} |
|||
<tr> |
|||
<td>{{m.menu}}</td> |
|||
<td>{{m.quantity}}</td> |
|||
<td>{{m.amount}}</td> |
|||
<td>{{m.paymentMethod}}</td> |
|||
<td>{{m.date}}</td> |
|||
<td><a href="{% url 'gestion:cancelMenu' m.pk %}" class="button small">Annuler</a></td> |
|||
</tr> |
|||
{%endfor%} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="pagination special"> |
|||
<span class="step-links"> |
|||
{% if menus.has_previous %} |
|||
<a href="{% url 'users:allMenus' user.pk 1 %}">« Première </a> |
|||
<a href="{% url 'users:allMenus' user.pk menus.previous_page_number %}"> Précédente </a> |
|||
{% endif %} |
|||
|
|||
<span class="current"> |
|||
Page {{ menus.number }} sur {{ menus.paginator.num_pages }}. |
|||
</span> |
|||
|
|||
{% if menus.has_next %} |
|||
<a href="{% url 'users:allMenus' user.pk menus.next_page_number %}"> Suivante </a> |
|||
<a href="{% url 'users:allMenus' user.pk menus.paginator.num_pages %}"> Dernière »</a> |
|||
{% endif %} |
|||
</span> |
|||
</div> |
|||
</section> |
|||
</section> |
|||
{%endblock%} |
|||
Loading…
Reference in new issue