diff --git a/copanier/config.py b/copanier/config.py index 7c75404..c62a8e9 100644 --- a/copanier/config.py +++ b/copanier/config.py @@ -12,8 +12,8 @@ SMTP_PASSWORD = "" SMTP_LOGIN = "" FROM_EMAIL = "" STAFF = [] -#LOCALE = "fr_FR.UTF-8" -LOCALE = "en_US.UTF-8" +LOCALE = "fr_FR.UTF-8" +#LOCALE = "en_US.UTF-8" SITE_NAME = "Copanier" SITE_DESCRIPTION = "Shared orders" EMAIL_SIGNATURE = "The kind people behind copanier" diff --git a/copanier/templates/base.html b/copanier/templates/base.html index 1e7f18a..542d6a6 100644 --- a/copanier/templates/base.html +++ b/copanier/templates/base.html @@ -1,3 +1,5 @@ +{% import "includes/macros.html" as macros %} + diff --git a/copanier/templates/delivery/list_deliveries.html b/copanier/templates/delivery/list_deliveries.html index 22a2185..cac622b 100644 --- a/copanier/templates/delivery/list_deliveries.html +++ b/copanier/templates/delivery/list_deliveries.html @@ -5,9 +5,6 @@

Distributions

{% if request['user'].email == delivery.contact and delivery.status > delivery.EMPTY %} -
  •  Boîte à outils
  • {% endif %} +
  • +  Boîte à outils +
  • + {% endif %} {% if request.user and request.user.is_staff %} {% if delivery.is_archived %}
  • @@ -41,12 +45,8 @@  Produits
  • {% endif %} -
    - - @@ -54,7 +54,15 @@ {% if delivery.has_products %} {% for (id, producer) in delivery.get_producers_for_referent(request.user.email).items() %} {% if producer.needs_price_update(delivery) %} -

    Merci de mettre à jour les prix pour « {{ producer.name }} ».

    + {% set modal_body %} +

    Mise à jour des prix

    + + Certains produits dont tu est référent⋅e ont besoin d'être mis à jour.

    + Est-ce que tu veux t'en occuper maintenant ?
    + + Oui, mettre à jour les prix pour {{ producer.name }} + {%- endset %} + {{ macros.modal(id="update-price", body=modal_body, checked=True) }} {% endif %} {% endfor %} {% include "includes/delivery_table.html" %} diff --git a/copanier/templates/includes/macros.html b/copanier/templates/includes/macros.html new file mode 100644 index 0000000..f6073f7 --- /dev/null +++ b/copanier/templates/includes/macros.html @@ -0,0 +1,11 @@ +{% macro modal(id, body, label="", checked=False) -%} +{% if label %} + +{% endif %} + + +
    + {{ body }} + +
    +{%- endmacro %} \ No newline at end of file diff --git a/copanier/templates/products/edit_producer.html b/copanier/templates/products/edit_producer.html index ef2fd40..9b09055 100644 --- a/copanier/templates/products/edit_producer.html +++ b/copanier/templates/products/edit_producer.html @@ -77,8 +77,7 @@ Des frais de livraison de {{ delivery.shipping[producer.id] }}€ ont été enre Marquer les prix comme OK {% endif %} -

    Vous pouvez éditer les produits en cliquant sur leur nom.

    - +
    Produit