mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 19:42:37 +02:00
parent
7b099eaeba
commit
a0ada779b2
6 changed files with 30 additions and 13 deletions
|
@ -12,8 +12,8 @@ SMTP_PASSWORD = ""
|
||||||
SMTP_LOGIN = ""
|
SMTP_LOGIN = ""
|
||||||
FROM_EMAIL = ""
|
FROM_EMAIL = ""
|
||||||
STAFF = []
|
STAFF = []
|
||||||
#LOCALE = "fr_FR.UTF-8"
|
LOCALE = "fr_FR.UTF-8"
|
||||||
LOCALE = "en_US.UTF-8"
|
#LOCALE = "en_US.UTF-8"
|
||||||
SITE_NAME = "Copanier"
|
SITE_NAME = "Copanier"
|
||||||
SITE_DESCRIPTION = "Shared orders"
|
SITE_DESCRIPTION = "Shared orders"
|
||||||
EMAIL_SIGNATURE = "The kind people behind copanier"
|
EMAIL_SIGNATURE = "The kind people behind copanier"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
{% import "includes/macros.html" as macros %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
|
@ -5,9 +5,6 @@
|
||||||
<h1>Distributions</h1>
|
<h1>Distributions</h1>
|
||||||
<div class="pure-menu pure-menu-horizontal">
|
<div class="pure-menu pure-menu-horizontal">
|
||||||
<ul class="pure-menu-list">
|
<ul class="pure-menu-list">
|
||||||
<li class="pure-menu-item">
|
|
||||||
<a class="pure-menu-link" href="{{ url_for('new_delivery') }}"><i class="icon-hotairballoon"></i> Créer une nouvelle distribution</a>
|
|
||||||
</li>
|
|
||||||
<li class="pure-menu-item">
|
<li class="pure-menu-item">
|
||||||
<a class="pure-menu-link" href="{{ url_for('list_archives') }}"><i class="icon-telescope"></i> Voir les distributions archivées</a>
|
<a class="pure-menu-link" href="{{ url_for('list_archives') }}"><i class="icon-telescope"></i> Voir les distributions archivées</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
@ -27,7 +28,10 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{% if request['user'].email == delivery.contact and delivery.status > delivery.EMPTY %}
|
{% if request['user'].email == delivery.contact and delivery.status > delivery.EMPTY %}
|
||||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ url_for('show_delivery_toolbox', id=delivery.id) }}"><i class="icon-tools"></i> Boîte à outils</a></li> {% endif %}
|
<li class="pure-menu-item">
|
||||||
|
<a class="pure-menu-link" href="{{ url_for('show_delivery_toolbox', id=delivery.id) }}"><i class="icon-tools"></i> Boîte à outils</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
{% if request.user and request.user.is_staff %}
|
{% if request.user and request.user.is_staff %}
|
||||||
{% if delivery.is_archived %}
|
{% if delivery.is_archived %}
|
||||||
<li class="pure-menu-item">
|
<li class="pure-menu-item">
|
||||||
|
@ -41,12 +45,8 @@
|
||||||
<a class="pure-menu-link" href="{{ url_for('list_products', id=delivery.id) }}"><i class="icon-pricetags"></i> Produits</a>
|
<a class="pure-menu-link" href="{{ url_for('list_products', id=delivery.id) }}"><i class="icon-pricetags"></i> Produits</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -54,7 +54,15 @@
|
||||||
{% if delivery.has_products %}
|
{% if delivery.has_products %}
|
||||||
{% for (id, producer) in delivery.get_producers_for_referent(request.user.email).items() %}
|
{% for (id, producer) in delivery.get_producers_for_referent(request.user.email).items() %}
|
||||||
{% if producer.needs_price_update(delivery) %}
|
{% if producer.needs_price_update(delivery) %}
|
||||||
<p class="notification info">Merci de <a href="{{ url_for('edit_producer', delivery_id=delivery.id, producer_id=producer.id) }}">mettre à jour les prix pour « {{ producer.name }} ».</a></p>
|
{% set modal_body %}
|
||||||
|
<h3>Mise à jour des prix</h3>
|
||||||
|
|
||||||
|
Certains produits dont tu est référent⋅e ont besoin d'être mis à jour.<br /><br />
|
||||||
|
Est-ce que tu veux t'en occuper maintenant ?<br />
|
||||||
|
|
||||||
|
<a class="button" href="{{ url_for('edit_producer', delivery_id=delivery.id, producer_id=producer.id) }}#products">Oui, mettre à jour les prix pour {{ producer.name }}</a>
|
||||||
|
{%- endset %}
|
||||||
|
{{ macros.modal(id="update-price", body=modal_body, checked=True) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% include "includes/delivery_table.html" %}
|
{% include "includes/delivery_table.html" %}
|
||||||
|
|
11
copanier/templates/includes/macros.html
Normal file
11
copanier/templates/includes/macros.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{% macro modal(id, body, label="", checked=False) -%}
|
||||||
|
{% if label %}
|
||||||
|
<label for="modal-{{ id }}" class="toggle-label">{{ label }}</label>
|
||||||
|
{% endif %}
|
||||||
|
<input type="checkbox" id="modal-{{ id }}" class="toggle" {% if checked %}checked{% endif %}>
|
||||||
|
<label for="modal-{{ id }}" class="toggle-background"></label>
|
||||||
|
<div class="toggle-container">
|
||||||
|
{{ body }}
|
||||||
|
<label for="modal-{{ id }}" class="toggle-label">Fermer</label>
|
||||||
|
</div>
|
||||||
|
{%- endmacro %}
|
|
@ -77,8 +77,7 @@ Des frais de livraison de {{ delivery.shipping[producer.id] }}€ ont été enre
|
||||||
<a class="button" href="{{ url_for('validate_producer_prices', delivery_id=delivery.id, producer_id=producer.id) }}">Marquer les prix comme OK</a>
|
<a class="button" href="{{ url_for('validate_producer_prices', delivery_id=delivery.id, producer_id=producer.id) }}">Marquer les prix comme OK</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h3>
|
</h3>
|
||||||
<p>Vous pouvez éditer les produits en cliquant sur leur nom.</p>
|
<table id="products" class="pure-table">
|
||||||
<table class="pure-table">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Produit</th>
|
<th>Produit</th>
|
||||||
|
|
Loading…
Reference in a new issue