mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 19:42:37 +02:00
Ajout d'un menu
This commit is contained in:
parent
5ec92d9531
commit
be83db4a15
14 changed files with 515 additions and 77 deletions
|
@ -13,12 +13,12 @@ The main differences are :
|
|||
|
||||
- Support for multiple producers (and persons to handle these producers)
|
||||
- A concept of groups was added : multiple persons can belong to the same group (and create / edit orders).
|
||||
- A minimal interface to add / remove / update products from the website.
|
||||
- Support out of stock products
|
||||
- A minimal interface to add / remove / update products from the website.
|
||||
- Support for out of stock products
|
||||
- Automatically compute a settlement plan (using the [debts library](https://framagit.org/almet/debts))
|
||||
- Remove paiement tracking (as it conflicts with auto-settlement of debts)
|
||||
- Add a page with tools to ease delivery management
|
||||
- Drop support for CSV files
|
||||
- Drop support for CSV files in favor of XLS files only
|
||||
- Send emails to producers referents, with an order summary
|
||||
- Generate PDF files rather than XLS files (for order summary, signing sheet and paiements repartition)
|
||||
|
||||
|
|
21
TODO
Normal file
21
TODO
Normal file
|
@ -0,0 +1,21 @@
|
|||
Repenser l'interface pour la rendre plus simple
|
||||
Refaire une interface plus simple (moins de boutons partout, qu'on s'y retrouve plus)
|
||||
Uniformiser le nom des choses. Livraison → Distribution
|
||||
|
||||
Ajouter un numéro de téléphone de la personne référente de la commande
|
||||
Permettre la supression des produits
|
||||
Gérer les frais de livraison
|
||||
Bug par rapport aux ruptures
|
||||
Rendre plus visible l'action de modifier une commande
|
||||
|
||||
Ajouter la trame (agenda d’une distribution) dans la boite à outil du coordinateur
|
||||
Explorer la possibilité de faire des ajustements automatiques
|
||||
Il semble que les prix trop précis ne sont pas acceptés
|
||||
utiliser une version lowercase des emails
|
||||
|
||||
Permettre l'ajout de produits
|
||||
Ajouter un moyen d'ajouter un⋅e producteurice
|
||||
Ajouter un moyen de changer le nom de la personne référente pour un producteur / productrice
|
||||
Ajouter une info « prix mis à jour » pour les référent⋅e⋅s
|
||||
Faciliter la duplication de distribution
|
||||
Ajouter une note explicative pour la répartition des chèques
|
|
@ -179,6 +179,7 @@ class Product(Base):
|
|||
name: str
|
||||
ref: str
|
||||
price: price_field
|
||||
last_update: datetime_field = datetime.now()
|
||||
unit: str = ""
|
||||
description: str = ""
|
||||
url: str = ""
|
||||
|
@ -199,6 +200,7 @@ class Product(Base):
|
|||
self.unit = form.get("unit")
|
||||
self.description = form.get("description")
|
||||
self.url = form.get("url")
|
||||
self.last_update = datetime.now()
|
||||
if form.get("packing"):
|
||||
self.packing = form.int("packing")
|
||||
if "rupture" in form:
|
||||
|
@ -221,7 +223,7 @@ class ProductOrder(Base):
|
|||
@dataclass
|
||||
class Order(Base):
|
||||
products: Dict[str, ProductOrder] = field(default_factory=dict)
|
||||
phone_number : str = ""
|
||||
phone_number: str = ""
|
||||
|
||||
def __getitem__(self, ref):
|
||||
if isinstance(ref, Product):
|
||||
|
@ -431,7 +433,7 @@ class Delivery(PersistedBase):
|
|||
|
||||
def get_referents(self):
|
||||
return [producer.referent for producer in self.producers.values()]
|
||||
|
||||
|
||||
def total_for(self, person):
|
||||
if person.email not in self.orders:
|
||||
return 0
|
||||
|
|
|
@ -660,4 +660,14 @@ table.paiements tr:hover td {
|
|||
|
||||
.placeholder {
|
||||
padding: 3rem !important;
|
||||
}
|
||||
|
||||
ul.actions {
|
||||
list-style-type: none;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
ul.actions > li {
|
||||
display: inline;
|
||||
margin-left: 1em;
|
||||
}
|
11
copanier/static/purecss.css
Normal file
11
copanier/static/purecss.css
Normal file
File diff suppressed because one or more lines are too long
252
copanier/static/side-menu.css
Normal file
252
copanier/static/side-menu.css
Normal file
|
@ -0,0 +1,252 @@
|
|||
body {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.pure-img-responsive {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
Add transition to containers so they can push in and out.
|
||||
*/
|
||||
#layout,
|
||||
#menu,
|
||||
.menu-link {
|
||||
-webkit-transition: all 0.2s ease-out;
|
||||
-moz-transition: all 0.2s ease-out;
|
||||
-ms-transition: all 0.2s ease-out;
|
||||
-o-transition: all 0.2s ease-out;
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
|
||||
/*
|
||||
This is the parent `<div>` that contains the menu and the content area.
|
||||
*/
|
||||
#layout {
|
||||
position: relative;
|
||||
left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
#layout.active #menu {
|
||||
left: 150px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#layout.active .menu-link {
|
||||
left: 150px;
|
||||
}
|
||||
/*
|
||||
The content `<div>` is where all your content goes.
|
||||
*/
|
||||
.content {
|
||||
margin: 0 auto;
|
||||
padding: 0 2em;
|
||||
max-width: 800px;
|
||||
margin-bottom: 50px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
padding: 2.5em 2em 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.header h1 {
|
||||
margin: 0.2em 0;
|
||||
font-size: 3em;
|
||||
font-weight: 300;
|
||||
}
|
||||
.header h2 {
|
||||
font-weight: 300;
|
||||
color: #ccc;
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.content-subhead {
|
||||
margin: 50px 0 20px 0;
|
||||
font-weight: 300;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
|
||||
appears on the left side of the page.
|
||||
*/
|
||||
|
||||
#menu {
|
||||
margin-left: -200px; /* "#menu" width */
|
||||
width: 200px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000; /* so the menu or its navicon stays above all content */
|
||||
background: #191818;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
/*
|
||||
All anchors inside the menu should be styled like this.
|
||||
*/
|
||||
#menu a {
|
||||
color: #999;
|
||||
border: none;
|
||||
padding: 0.6em 0 0.6em 0.6em;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove all background/borders, since we are applying them to #menu.
|
||||
*/
|
||||
#menu .pure-menu,
|
||||
#menu .pure-menu ul {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*
|
||||
Add that light border to separate items into groups.
|
||||
*/
|
||||
#menu .pure-menu ul,
|
||||
#menu .pure-menu .menu-item-divided {
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
/*
|
||||
Change color of the anchor links on hover/focus.
|
||||
*/
|
||||
#menu .pure-menu li a:hover,
|
||||
#menu .pure-menu li a:focus {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
/*
|
||||
This styles the selected menu item `<li>`.
|
||||
*/
|
||||
#menu .pure-menu-selected,
|
||||
#menu .pure-menu-heading {
|
||||
background: #1f8dd6;
|
||||
}
|
||||
/*
|
||||
This styles a link within a selected menu item `<li>`.
|
||||
*/
|
||||
#menu .pure-menu-selected a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*
|
||||
This styles the menu heading.
|
||||
*/
|
||||
#menu .pure-menu-heading {
|
||||
font-size: 110%;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* -- Dynamic Button For Responsive Menu -------------------------------------*/
|
||||
|
||||
/*
|
||||
The button to open/close the Menu is custom-made and not part of Pure. Here's
|
||||
how it works:
|
||||
*/
|
||||
|
||||
/*
|
||||
`.menu-link` represents the responsive menu toggle that shows/hides on
|
||||
small screens.
|
||||
*/
|
||||
.menu-link {
|
||||
position: fixed;
|
||||
display: block; /* show this only on small screens */
|
||||
top: 0;
|
||||
left: 0; /* "#menu width" */
|
||||
background: #000;
|
||||
background: rgba(0,0,0,0.7);
|
||||
font-size: 10px; /* change this value to increase/decrease button size */
|
||||
z-index: 10;
|
||||
width: 2em;
|
||||
height: auto;
|
||||
padding: 2.1em 1.6em;
|
||||
}
|
||||
|
||||
.menu-link:hover,
|
||||
.menu-link:focus {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.menu-link span {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menu-link span,
|
||||
.menu-link span:before,
|
||||
.menu-link span:after {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: 0.2em;
|
||||
}
|
||||
|
||||
.menu-link span:before,
|
||||
.menu-link span:after {
|
||||
position: absolute;
|
||||
margin-top: -0.6em;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.menu-link span:after {
|
||||
margin-top: 0.6em;
|
||||
}
|
||||
|
||||
|
||||
/* -- Responsive Styles (Media Queries) ------------------------------------- */
|
||||
|
||||
/*
|
||||
Hides the menu at `48em`, but modify this based on your app's needs.
|
||||
*/
|
||||
@media (min-width: 48em) {
|
||||
|
||||
.header,
|
||||
.content {
|
||||
padding-left: 2em;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
#layout {
|
||||
padding-left: 200px; /* left col width "#menu" */
|
||||
left: 0;
|
||||
}
|
||||
#menu {
|
||||
left: 200px;
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
position: fixed;
|
||||
left: 200px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#layout.active .menu-link {
|
||||
left: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 48em) {
|
||||
/* Only apply this when the window is small. Otherwise, the following
|
||||
case results in extra padding on the left:
|
||||
* Make the window small.
|
||||
* Tap the menu to trigger the active state.
|
||||
* Make the window large again.
|
||||
*/
|
||||
#layout.active {
|
||||
position: relative;
|
||||
left: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.pure-menu-item a {
|
||||
display: block;
|
||||
}
|
|
@ -7,29 +7,90 @@
|
|||
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"> -->
|
||||
<link rel="stylesheet" type="text/css" href="/static/app.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/icomoon.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/purecss.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/side-menu.css">
|
||||
|
||||
{% block head %}
|
||||
{% endblock head %}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
{% if message %}
|
||||
<section class="notification {{ message[1] }}"><i class="icon-megaphone"></i> {{ message[0] }}</section>
|
||||
{% endif %}
|
||||
<section class="menu">
|
||||
<h1><a href="/">{{ config.SITE_NAME }}</a> <small>{{ config.SITE_DESCRIPTION }}</small></h1>
|
||||
{% block title %}<h2>{% if delivery %}{{ delivery.name }}{% endif %}{% block actions %}{% endblock %}{% endblock %}</h2>
|
||||
|
||||
<div id="layout">
|
||||
<a href="#menu" id="menuLink" class="menu-link">
|
||||
<span></span>
|
||||
</a>
|
||||
|
||||
<div id="menu">
|
||||
<div class="pure-menu">
|
||||
|
||||
<h1>{{ config.SITE_NAME }}</h1>
|
||||
<ul class="pure-menu-list">
|
||||
{% if delivery %}
|
||||
<li class="pure-menu-heading">
|
||||
Cette distrib
|
||||
</li>
|
||||
<li class="pure-menu-item">
|
||||
<a href="/livraison/{{ delivery.id }}/commander">Commander</a>
|
||||
</li>
|
||||
<li class="pure-menu-item">
|
||||
<a href="/livraison/{{ delivery.id }}/émargement">Fiches de commandes par coloc</a>
|
||||
</li>
|
||||
<li class="pure-menu-item">
|
||||
<a href="/livraison/{{ delivery.id }}/producteurices.pdf">Fiches commandes product⋅eurs⋅ices</a>
|
||||
</li>
|
||||
<li class="pure-menu-item">
|
||||
<a href="/livraison/{{ delivery.id }}/solde">Paiements</a>
|
||||
</li>
|
||||
{% if request.user.is_staff %}
|
||||
<li class="pure-menu-item">
|
||||
<a href="/livraison/{{ delivery.id }}/gérer">Boîte à outils</a>
|
||||
</li>
|
||||
<li class="pure-menu-item">
|
||||
<a href="/livraison/{{ delivery.id }}/edit">Modifier les infos</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<li class="pure-menu-heading">
|
||||
Actions
|
||||
</li>
|
||||
<li class="pure-menu-item">
|
||||
<a href="/"><i class="icon-happy"></i> Voir les distributions</a>
|
||||
</li>
|
||||
{% if request.user.is_staff %}
|
||||
<li class="pure-menu-item">
|
||||
<a href="/livraison"><i class="icon-hotairballoon"></i> Nouvelle distribution</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="/groupes"><i class="icon-globe"></i> Gérer les groupes</a>
|
||||
</li>
|
||||
<li class="pure-menu-item">
|
||||
<a href="#" class="pure-menu-link"><i class="icon-lock"></i> Se déconnecter</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
{% if message %}
|
||||
<section class="notification {{ message[1] }}"><i class="icon-megaphone"></i> {{ message[0] }}</section>
|
||||
{% endif %}
|
||||
<div class="content">
|
||||
{% block body %}
|
||||
{% endblock body %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
<section class="menu">
|
||||
|
||||
<nav>
|
||||
{% if request.user %}
|
||||
<i class="icon-lock"></i> <span>{{ request["user"].email }} {% if request["user"].group_name %}({{ request["user"].group_name }}){% endif %} <a href="/déconnexion">déconnexion</a></span>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</section>
|
||||
</header>
|
||||
<main>
|
||||
{% block body %}
|
||||
{% endblock body %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,16 +1,49 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block actions %}
|
||||
{% include "includes/order_button.html" %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
{% include "includes/delivery_head.html" %}
|
||||
|
||||
{% if request['user'].email == delivery.contact and delivery.status > delivery.EMPTY %}
|
||||
<div class="notification info"><i class="icon-lightbulb"></i> Vous êtes la personne référente de cette distribution <a class="button" href="/livraison/{{ delivery.id }}/gérer">Voir la boîte à outils</a></div>
|
||||
{% elif request['user'].email in delivery.get_referents() %}
|
||||
<div class="notification info"><i class="icon-lightbulb"></i> Vous êtes référent⋅e pour cette distribution (merci !). <a class="button" href="/livraison/{{ delivery.id }}/producteurices?referent={{request['user'].email}}">Gérer les produits dont vous vous occupez</a></div>
|
||||
{% endif %}
|
||||
<div class="header">
|
||||
<h1>{{ delivery.name }} ({% if delivery.status == delivery.OPEN %}Commandes jusqu'au {{ delivery.order_before|date|capitalize }}{% elif delivery.status == delivery.ADJUSTMENT %}Ajustements en cours{% elif delivery.status == delivery.CLOSED %}Fermée{% else %}Archivée{% endif %})
|
||||
</h1>
|
||||
<h4>
|
||||
Distribution <i class="icon-clock"></i> {{ delivery.from_date|date|capitalize }}, {{ delivery.from_date|time }} - {{ delivery.to_date|time }}, à <i class="icon-streetsign"></i> {{ delivery.where }}.
|
||||
</h4>
|
||||
<ul class="actions">
|
||||
{% include "includes/order_button.html" %}
|
||||
{% if request['user'].email == delivery.contact and delivery.status > delivery.EMPTY %}
|
||||
<li><a class="button" href="/livraison/{{ delivery.id }}/gérer">Voir la boîte à outils</a></li>
|
||||
{% elif request['user'].email in delivery.get_referents() %}
|
||||
<li><a class="button" href="/livraison/{{ delivery.id }}/producteurices?referent={{request['user'].email}}">Gérer les produits dont vous vous occupez</a></li>
|
||||
{% endif %}
|
||||
{% if not delivery.is_archived and delivery.status == delivery.CLOSED %}
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/producteurices.pdf"><i class="icon-ribbon"></i> Bon de commande</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/rapport-complet.xlsx"><i class="icon-grid"></i> Rapport complet</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/émargement" target="_blank"><i class="icon-document"></i> Résumé de commandes</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if request.user and request.user.is_staff %}
|
||||
{% if delivery.is_archived %}
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/désarchiver" class="button danger"><i class="icon-hazardous"></i> Désarchiver</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/exporter"><i class="icon-layers"></i> Télécharger les infos produits</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/edit"><i class="icon-adjustments"></i> Modifier la livraison</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/solde"><i class="icon-wallet"></i> Répartition des paiements</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="progressbar">
|
||||
<li {% if delivery.status == delivery.EMPTY %}class="active"{% endif %}>Mise à jour des prix</li>
|
||||
<li {% if delivery.status == delivery.OPEN %}class="active"{% endif %}>Ouverture des commandes</li>
|
||||
|
@ -38,35 +71,6 @@
|
|||
</article>
|
||||
<hr>
|
||||
<ul class="toolbox">
|
||||
{% if not delivery.is_archived and delivery.status == delivery.CLOSED %}
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/producteurices.pdf"><i class="icon-ribbon"></i> Bon de commande</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/rapport-complet.xlsx"><i class="icon-grid"></i> Rapport complet</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/émargement" target="_blank"><i class="icon-document"></i> Résumé de commandes</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if request.user and request.user.is_staff %}
|
||||
{% if delivery.is_archived %}
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/désarchiver" class="button danger"><i class="icon-hazardous"></i> Désarchiver</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/exporter"><i class="icon-layers"></i> Télécharger les infos produits</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/edit"><i class="icon-adjustments"></i> Modifier la livraison</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/livraison/{{ delivery.id }}/solde"><i class="icon-wallet"></i> Répartition des paiements</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="/groupes"><i class="icon-globe"></i> Gérer les groupes</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
{% endblock body %}
|
||||
|
|
64
copanier/templates/deliverybase.html
Normal file
64
copanier/templates/deliverybase.html
Normal file
|
@ -0,0 +1,64 @@
|
|||
{% extends "base.html" %}
|
||||
{% block body %}
|
||||
<div id="layout">
|
||||
<a href="#menu" id="menuLink" class="menu-link">
|
||||
<span></span>
|
||||
</a>
|
||||
|
||||
<div id="menu">
|
||||
<div class="pure-menu">
|
||||
<a class="pure-menu-heading" href="#">Company</a>
|
||||
|
||||
<ul class="pure-menu-list">
|
||||
<li class="pure-menu-item"><a href="#" class="pure-menu-link">Home</a></li>
|
||||
<li class="pure-menu-item"><a href="#" class="pure-menu-link">About</a></li>
|
||||
|
||||
<li class="pure-menu-item menu-item-divided pure-menu-selected">
|
||||
<a href="#" class="pure-menu-link">Services</a>
|
||||
</li>
|
||||
|
||||
<li class="pure-menu-item"><a href="#" class="pure-menu-link">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
<div class="header">
|
||||
<h1>Page Title</h1>
|
||||
<h2>A subtitle for your page goes here</h2>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h2 class="content-subhead">How to use this layout</h2>
|
||||
<p>
|
||||
To use this layout, you can just copy paste the HTML, along with the CSS in <a href="/css/layouts/side-menu.css" alt="Side Menu CSS">side-menu.css</a>, and the JavaScript in <a href="/js/ui.js">ui.js</a>. The JS file uses vanilla JavaScript to simply toggle an <code>active</code> class that makes the menu responsive.
|
||||
</p>
|
||||
|
||||
<h2 class="content-subhead">Now Let's Speak Some Latin</h2>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1-4">
|
||||
<img class="pure-img-responsive" src="http://farm3.staticflickr.com/2875/9069037713_1752f5daeb.jpg" alt="Peyto Lake">
|
||||
</div>
|
||||
<div class="pure-u-1-4">
|
||||
<img class="pure-img-responsive" src="http://farm3.staticflickr.com/2813/9069585985_80da8db54f.jpg" alt="Train">
|
||||
</div>
|
||||
<div class="pure-u-1-4">
|
||||
<img class="pure-img-responsive" src="http://farm6.staticflickr.com/5456/9121446012_c1640e42d0.jpg" alt="T-Shirt Store">
|
||||
</div>
|
||||
<div class="pure-u-1-4">
|
||||
<img class="pure-img-responsive" src="http://farm8.staticflickr.com/7357/9086701425_fda3024927.jpg" alt="Mountain">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="content-subhead">Try Resizing your Browser</h2>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock body %}
|
|
@ -1,11 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
{% if group.id %}
|
||||
<div class="header">
|
||||
{% if group.id %}
|
||||
<h1>Modifier le groupe</h1>
|
||||
{% else %}
|
||||
<h1>Créer un nouveau groupe (coloc / famille)</h1>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<h1>Créer un nouveau groupe</h1>
|
||||
{% endif %}
|
||||
<h4>Les groupes permettent de gérer les commandes pour d'autres personnes (colocs, familles, etc)</h4>
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
<label>
|
||||
<p>Nom</p>
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
<div class="header">
|
||||
<h1>Groupes</h1>
|
||||
<ul class="actions">
|
||||
<li><a class="button" href="/groupes/créer"><i class="icon-globe"></i> Créer un nouveau groupe</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if not request['user'].group_id %}
|
||||
<p>Bienvenue ! Avant de pouvoir commander, peux-tu nous indiquer de quelle coloc / famille fais-tu partie ? </p>
|
||||
{% endif %}
|
||||
<p>Voici la liste des colocs / familles déjà renseignées. Tu peux aussi <a class="button" href="/groupes/créer"><i class="icon-globe"></i> créer un nouveau groupe</a></p>
|
||||
|
||||
|
||||
{% for group in groups.groups.values() %}
|
||||
|
|
|
@ -1,10 +1,24 @@
|
|||
{% extends "base.html" %}
|
||||
{% block body %}
|
||||
<div class="header">
|
||||
<h1>Distributions</h1>
|
||||
<ul class="actions">
|
||||
<li>
|
||||
<a class="button" href="/livraison"><i class="icon-hotairballoon"></i> Créer une nouvelle distribution</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="button" href="/livraison"><i class="icon-telescope"></i> Voir les distribution passées</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% with deliveries=incoming %}
|
||||
{% include "includes/delivery_list.html" %}
|
||||
{% endwith %}
|
||||
{% if former %}
|
||||
<h2>Livraisons passées</h2>
|
||||
<div class="header">
|
||||
<h1>Distributions passées</h1>
|
||||
</div>
|
||||
{% with deliveries=former %}
|
||||
{% include "includes/delivery_small_list.html" %}
|
||||
{% endwith %}
|
||||
|
@ -13,14 +27,4 @@
|
|||
<a href="/archives">Voir les livraisons archivées</a>
|
||||
<hr>
|
||||
{% endif %}
|
||||
<ul class="toolbox">
|
||||
{% if request.user.is_staff %}
|
||||
<li>
|
||||
<a class="button" href="/livraison"><i class="icon-hotairballoon"></i> Nouvelle livraison</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="/groupes" class="button"><i class="icon-globe"></i> Gérer les groupes / colocs</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock body %}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<ul class="delivery-head">
|
||||
{% if delivery.description %}<li><i class="icon-basket"></i> <strong>Produits</strong> {{ delivery.description }}</li>{% endif %}
|
||||
<li><i class="icon-streetsign"></i> <strong>Lieu</strong> {{ delivery.where }}</li>
|
||||
{% if display_counts %}
|
||||
<li><i class="icon-lightbulb"></i> <strong>{{ delivery.orders|length }}</strong> colocs</strong>, <strong>{{ delivery.products|length }}</strong> produits et <strong>{{ delivery.producers | length}}</strong> product⋅eurs⋅rices, <strong>{{ delivery.total }}€</strong></li>
|
||||
{% else %}
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>Aucune livraison.</p>
|
||||
<p>Il n'y a aucune distribution à venir.</p>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue