diff --git a/.gitignore b/.gitignore index 5c78ec5..1d84fc8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ __pycache__/ coverage.xml .coverage la_chariotte.egg-info/ +node_modules +/static/* +/media/* \ No newline at end of file diff --git a/README.md b/README.md index 0362734..e1398bc 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,24 @@ pip install -r requirements.txt pip install -r dev-requirements.txt ``` +## Travailler sur le frontend + +check sass version +```bash +sass --version +# used for developement: 1.59.3 compiled with dart2js 2.19.4 +``` + +watch for changes when updating scss files (from project root) +```bash +sass --watch --no-source-map ./la_chariotte/static/sass/style.sass:./la_chariotte/static/css/app.css +``` + +OR compile css only once (from project root) +```bash +sass --no-source-map ./la_chariotte/static/sass/style.sass:./la_chariotte/static/css/app.css +``` + ## Lancer les tests Lancer les tests avec pytest : diff --git a/la_chariotte/accounts/templates/registration/login.html b/la_chariotte/accounts/templates/registration/login.html index dacc4b9..3e7d057 100644 --- a/la_chariotte/accounts/templates/registration/login.html +++ b/la_chariotte/accounts/templates/registration/login.html @@ -2,13 +2,14 @@ {% block title %}Connexion{% endblock %} +{% block content_title %}Connexion{% endblock %} + {% block content %} -

Connexion

{% csrf_token %} {{ form.as_p }} - - Créer un compte + + Créer un compte
{% endblock %} \ No newline at end of file diff --git a/la_chariotte/accounts/templates/registration/signup.html b/la_chariotte/accounts/templates/registration/signup.html index c049920..640a6a1 100644 --- a/la_chariotte/accounts/templates/registration/signup.html +++ b/la_chariotte/accounts/templates/registration/signup.html @@ -1,13 +1,13 @@ {% extends 'base.html' %} {% block title %}Créer un compte{% endblock %} +{% block content_title %}Créer un compte{% endblock %} {% block content %} -

Créer un compte

{% csrf_token %} {{ form.as_p }} - +
{% endblock %} \ No newline at end of file diff --git a/la_chariotte/order/templates/order/grouped_order_detail.html b/la_chariotte/order/templates/order/grouped_order_detail.html index 8ad777f..f91857d 100644 --- a/la_chariotte/order/templates/order/grouped_order_detail.html +++ b/la_chariotte/order/templates/order/grouped_order_detail.html @@ -1,48 +1,45 @@ - - - - - Commandes groupées {{ grouped_order.id }} - - -

Détail de la commande groupée {{ grouped_order.id }}, avec la liste des produits associés

-
-

{{ grouped_order }} -

Organisateur·ice : {{ grouped_order.orga }}

-

Date de livraison : {{ grouped_order.delivery_date }}

+{% extends 'base.html' %} - {% if not user.is_authenticated %} -

Vous êtes l'organisateur·ice de cette commande groupée ? - - Connectez-vous pour accéder à la page de gestion -

- {% endif %} +{% block title %}{{ grouped_order }}{% endblock %} - {% if user == grouped_order.orga %} - - Page de gestion de la commande groupée - {% endif %} +{% block content %} +

Détail de la commande groupée {{ grouped_order.id }}, avec la liste des produits associés

+
+

{{ grouped_order }} +

Organisateur·ice : {{ grouped_order.orga }}

+

Date de livraison : {{ grouped_order.delivery_date }}

-

les produits disponibles pour cette commande groupée :

- - - - {% csrf_token %} -
-

{{ grouped_order }}

- {% if error_message %}

{{ error_message }}

{% endif %} - {% for item in grouped_order.item_set.all %} - -
- {% endfor %} -
- - - - + +
+ {% endfor %} + + + +{% endblock %} \ No newline at end of file diff --git a/la_chariotte/order/templates/order/grouped_order_overview.html b/la_chariotte/order/templates/order/grouped_order_overview.html index 7a8f469..d072cad 100644 --- a/la_chariotte/order/templates/order/grouped_order_overview.html +++ b/la_chariotte/order/templates/order/grouped_order_overview.html @@ -1,34 +1,31 @@ - - - - - Commandes groupées {{ grouped_order.id }} - - -

Vue d'organisation de la commande groupée {{ grouped_order.id }}, avec les produits commandés et les commandes individuelles

-
-

{{ grouped_order }} -

Organisateur·ice : {{ grouped_order.orga }}

-

Date de livraison : {{ grouped_order.delivery_date }}

+{% extends 'base.html' %} - les produits commandés pour cette commande groupée : - +{% block title %}{{ grouped_order }} - Organisateur·ice{% endblock %} - les commandes passées pour cette commande groupée : - +{% block content %} +

Vue d'organisation de la commande groupée {{ grouped_order.id }}, avec les produits commandés et les commandes individuelles

+
+

{{ grouped_order }} +

Organisateur·ice : {{ grouped_order.orga }}

+

Date de livraison : {{ grouped_order.delivery_date }}

- Retour à la page de commande - - + les produits commandés pour cette commande groupée : + + + les commandes passées pour cette commande groupée : + + + Retour à la page de commande + {% endblock %} \ No newline at end of file diff --git a/la_chariotte/order/templates/order/index.html b/la_chariotte/order/templates/order/index.html index fa38737..1a4b7b4 100644 --- a/la_chariotte/order/templates/order/index.html +++ b/la_chariotte/order/templates/order/index.html @@ -1,48 +1,86 @@ - - - - - Commandes groupées - index - - -

Index des commandes que l'utilisateur·ice connecté·e organise

+{% extends 'base.html' %} - {% if grouped_order_list.incoming_grouped_orders or grouped_order_list.crossed_deadline_grouped_orders or grouped_order_list.old_grouped_orders %} - {% if grouped_order_list.incoming_grouped_orders %} -

Commandes groupées à venir :

-