@@ -182,7 +183,8 @@
diff --git a/gestion/templates/gestion/kegs_list.html b/gestion/templates/gestion/kegs_list.html
index 7a95d72..7654827 100644
--- a/gestion/templates/gestion/kegs_list.html
+++ b/gestion/templates/gestion/kegs_list.html
@@ -12,9 +12,15 @@
Liste des fûts actifs
{{ kegH.amountSold }} € | {{ kegH.keg.amount }} € | Voir | -Fermer Modifier | +{% if perms.gestion.close_keg %}Fermer {% endif %}{% if perms.gestion.change_keg %}Modifier{% endif %} | {% endfor %} @@ -53,9 +59,15 @@
{{ keg.capacity }} L | {{ keg.amount }} € | Voir | -{% if keg.stockHold > 0 %}Percuter{% endif %} Modifier | +{% if perms.gestion.open_keg %}{% if keg.stockHold > 0 %}Percuter {% endif %}{% endif %}{% if perms.gestion.change_keg %}Modifier{% endif %} | {% endfor %} diff --git a/gestion/templates/gestion/manage.html b/gestion/templates/gestion/manage.html index b329d2a..815061d 100644 --- a/gestion/templates/gestion/manage.html +++ b/gestion/templates/gestion/manage.html @@ -5,9 +5,9 @@ {% block navbar %}{{ menu.barcode }} | {% for art in menu.articles.all %}{{art}},{% endfor %} | {{ menu.is_active | yesno:"Oui, Non"}} | -{% if menu.is_active %}Désa{% else %}A{% endif %}ctiver Modifier | +{% if perms.gestion.change_menu %}{% if menu.is_active %}Désa{% else %}A{% endif %}ctiver Modifier{% endif %} | {% endfor %} diff --git a/gestion/templates/gestion/product_profile.html b/gestion/templates/gestion/product_profile.html index c1edaf6..a6ba127 100644 --- a/gestion/templates/gestion/product_profile.html +++ b/gestion/templates/gestion/product_profile.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block entete %}
{{ product.is_active | yesno:"Oui, Non"}} | {{ product.deg }} | {{ product.volume }} cl | -Profil {% if product.is_active %}Désa{% else %}A{% endif %}ctiver Modifier | +Profil {% if perms.gestion.change_product %}{% if product.is_active %}Désa{% else %}A{% endif %}ctiver Modifier{% endif %} | {% endfor %} diff --git a/preferences/templates/preferences/cotisations_index.html b/preferences/templates/preferences/cotisations_index.html index aa7d130..fdcecf1 100644 --- a/preferences/templates/preferences/cotisations_index.html +++ b/preferences/templates/preferences/cotisations_index.html @@ -10,7 +10,9 @@
{{ cotisation.duration }} jours | {{ cotisation.amount }} € | -Modifier Supprimer | +{% if perms.preferences.change_cotisation %}Modifier {% endif %}{% if perms.preferences.delete_cotisation %}Supprimer{% endif %} |
{{ pm.is_usable_in_cotisation | yesno:"Oui, Non" }} | {{ pm.is_usable_in_reload | yesno:"Oui, Non" }} | {{ pm.affect_balance | yesno:"Oui, Non" }} | -Modifier Supprimer | +{% if perms.preferences.change_paymentmethod %}Modifier {% endif %}{% if perms.preferences.delete_paymentmethod %}Supprimer{% endif %} | {% endfor %} diff --git a/templates/nav.html b/templates/nav.html index 7244264..ca603be 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -2,27 +2,39 @@ Mon profil +{% if perms.gestion.add_consumptionhistory or perms.gestion.add_refund or perms.gestion.add_reload %} Caisse +{% endif %} +{% if perms.auth.add_user or perms.auth.view_user or perms.auth.add_group or perms.auth.view_group or perms.users.add_school or perms.users.view_school %} Gestion des clients +{% endif %} +{% if perms.gestion.view_product or perms.gestion.add_product or perms.gestion.add_keg or perms.gestion.view_keg or perms.gestion.change_keg or perms.gestion.view_menu or perms.gestion.add_menu %} Gestion des produits +{% endif %} Classement +{% if perms.preferences.change_generalpreferences %} Admin +{% endif %} +{% if perms.preferences.view_cotisation %} Cotisations +{% endif %} +{% if perms.preferences.view_cotisation %} Moyens de paiement +{% endif %} Deconnexion diff --git a/users/templates/users/admins_index.html b/users/templates/users/admins_index.html index 837df97..d2d15d5 100644 --- a/users/templates/users/admins_index.html +++ b/users/templates/users/admins_index.html @@ -25,7 +25,7 @@
{{ user }} {% if user.is_superuser %}(superuser){% endif %} | Profil | -Retirer des admins | +{% if not user.is_superuser %}Retirer des admins{% endif %} | {{c.amount}} | {{c.paymentMethod}} | {{c.date}} | -Annuler | +{% if perms.gestion.delete_consumptionhistory %}Annuler{% endif %} | {%endfor%} diff --git a/users/templates/users/all_menus.html b/users/templates/users/all_menus.html index 9ad411a..d32f1a4 100644 --- a/users/templates/users/all_menus.html +++ b/users/templates/users/all_menus.html @@ -33,7 +33,7 @@{{m.amount}} | {{m.paymentMethod}} | {{m.date}} | -Annuler | +{% if perms.gestion.delete_menuhistory %}Annuler{% endif %} | {%endfor%} diff --git a/users/templates/users/group_profile.html b/users/templates/users/group_profile.html index 5cb4180..5b09a75 100644 --- a/users/templates/users/group_profile.html +++ b/users/templates/users/group_profile.html @@ -19,12 +19,16 @@
{{ group.name }} | {{ group.permissions.count }} | {{ group.user_set.count }} | -Voir Éditer Supprimer | +Voir {% if perms.auth.change_group %}Éditer {% endif %}{% if perms.auth.delete_group %}Supprimer{% endif %} | {% endfor %} diff --git a/users/templates/users/index.html b/users/templates/users/index.html index 0f8dd85..8ef388d 100644 --- a/users/templates/users/index.html +++ b/users/templates/users/index.html @@ -16,9 +16,13 @@ Actions possibles :{{c.amount}} | {{c.paymentMethod}} | {{c.date}} | -Annuler | +{% if perms.gestion.delete_consumptionhistory %}Annuler{% endif %} | {%endfor%} @@ -184,7 +184,7 @@{{m.amount}} | {{m.paymentMethod}} | {{m.date}} | -Annuler | +{% if perms.gestion.delete_menuhistory %}Annuler{% endif %} | {%endfor%} @@ -249,7 +249,7 @@{{cotisation.paymentMethod}} | {{cotisation.endDate}} | {{cotisation.valid}} | -Valider Invalider | +{% if perms.users.validate_cotisationHistory %}Valider Invalider{% endif %} | {% endfor %} diff --git a/users/templates/users/schools_index.html b/users/templates/users/schools_index.html index 93d5e34..62a1f3d 100644 --- a/users/templates/users/schools_index.html +++ b/users/templates/users/schools_index.html @@ -23,7 +23,7 @@ {% for school in schools %}
{{ school }} | -Modifier Supprimer | +{% if perms.gestion.change_school %}Modifier {% endif %}{% if perms.gestion.delete_school %}Supprimer{% endif %} |