diff --git a/README.md b/README.md index ed011d993c..f658e45642 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,26 @@ ## Applications +### Right + +Il y a 3 types pe de droits : + + - Administrateur + - Entraineur (groupe `Trainer`) + - Gymnaste (groupe `Gymnast`) + +##### Administrateur + +Il peut tout faire. + +##### Entraîneur + +Peut tout faire sauf : + +- Gérer les skill +- Gérer les Pays +- Gérer les lieux + ### Skill ### Learned Skill diff --git a/templates/followup/accidents/create.html b/templates/followup/accidents/create.html index 52131a8f7c..f6c0ff0030 100644 --- a/templates/followup/accidents/create.html +++ b/templates/followup/accidents/create.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load static %} +{% load has_group %} {% block content %}
@@ -19,11 +20,16 @@
- -
- {{ form.gymnast }} - {{ form.gymnast_related }} - {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + +
+ {% if request.user|has_group:"Trainer" %} + {{ form.gymnast }} + {{ form.gymnast_related }} + {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + {% else %} + + + {% endif %}
diff --git a/templates/followup/chronos/create.html b/templates/followup/chronos/create.html index 8981c32bae..5a419e0339 100644 --- a/templates/followup/chronos/create.html +++ b/templates/followup/chronos/create.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load static %} +{% load has_group %} {% block content %}
@@ -21,9 +22,14 @@
- {{ form.gymnast }} - {{ form.gymnast_related }} - {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + {% if request.user|has_group:"Trainer" %} + {{ form.gymnast }} + {{ form.gymnast_related }} + {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + {% else %} + + + {% endif %}
diff --git a/templates/followup/heightweight/create.html b/templates/followup/heightweight/create.html index 3ece56d729..800d49dfe9 100644 --- a/templates/followup/heightweight/create.html +++ b/templates/followup/heightweight/create.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load static %} +{% load has_group %} {% block content %}
@@ -20,10 +21,15 @@
-
- {{ form.gymnast }} - {{ form.gymnast_related }} - {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} +
+ {% if request.user|has_group:"Trainer" %} + {{ form.gymnast }} + {{ form.gymnast_related }} + {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + {% else %} + + + {% endif %}
diff --git a/templates/followup/learnedskills/create.html b/templates/followup/learnedskills/create.html index 56a1a1cb31..201e099612 100644 --- a/templates/followup/learnedskills/create.html +++ b/templates/followup/learnedskills/create.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load static %} +{% load has_group %} {% block content %}
@@ -19,11 +20,16 @@
- -
- {{ form.gymnast }} - {{ form.gymnast_related }} - {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + +
+ {% if request.user|has_group:"Trainer" %} + {{ form.gymnast }} + {{ form.gymnast_related }} + {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + {% else %} + + + {% endif %}
diff --git a/templates/followup/mindstates/create.html b/templates/followup/mindstates/create.html index 14d924c81b..a3a15215dd 100644 --- a/templates/followup/mindstates/create.html +++ b/templates/followup/mindstates/create.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load static %} +{% load has_group %} {% block content %}
@@ -12,14 +13,19 @@
{% csrf_token %}
- -
- {{ form.gymnast }} - {{ form.gymnast_related }} - {% if form.gymnast.errors %} - + +
+ {% if request.user|has_group:"Trainer" %} + {{ form.gymnast }} + {{ form.gymnast_related }} + {% if form.gymnast.errors %} + + {% endif %} + {% else %} + + {% endif %}
diff --git a/templates/followup/plan/create.html b/templates/followup/plan/create.html index 28fe170513..eca9fd9c50 100644 --- a/templates/followup/plan/create.html +++ b/templates/followup/plan/create.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load static %} +{% load has_group %} {% block content %}
@@ -20,10 +21,15 @@
-
- {{ form.gymnast }} - {{ form.gymnast_related }} - {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} +
+ {% if request.user|has_group:"Trainer" %} + {{ form.gymnast }} + {{ form.gymnast_related }} + {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + {% else %} + + + {% endif %}
diff --git a/templates/followup/routinedone/create.html b/templates/followup/routinedone/create.html index 40c5ecc857..16de71a78e 100644 --- a/templates/followup/routinedone/create.html +++ b/templates/followup/routinedone/create.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load static%} +{% load has_group %} {% block content %}
@@ -13,14 +14,15 @@ {% csrf_token %}
- -
- {{ form.gymnast }} - {{ form.gymnast_related }} - {% if form.gymnast.errors %} - + +
+ {% if request.user|has_group:"Trainer" %} + {{ form.gymnast }} + {{ form.gymnast_related }} + {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + {% else %} + + {% endif %}
diff --git a/templates/followup/scores/create.html b/templates/followup/scores/create.html index 5ef7b49f0b..2651a3eae8 100644 --- a/templates/followup/scores/create.html +++ b/templates/followup/scores/create.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load static %} +{% load has_group %} {% block content %} @@ -13,14 +14,15 @@ {% csrf_token %}
- -
- {{ form.gymnast }} - {{ form.gymnast_related }} - {% if form.gymnast.errors %} - + +
+ {% if request.user|has_group:"Trainer" %} + {{ form.gymnast }} + {{ form.gymnast_related }} + {% if form.gymnast.errors %} {% for error in form.gymnast.errors %}{{error}}{% endfor %}{% endif %} + {% else %} + + {% endif %}
diff --git a/templates/locations/places/create.html b/templates/locations/places/create.html index 9693ecb820..5418fe087b 100644 --- a/templates/locations/places/create.html +++ b/templates/locations/places/create.html @@ -35,7 +35,7 @@
{{ form.postal }} {% if form.postal.errors %} {% for error in form.postal.errors %}{{error}}{% endfor %}{% endif %} -
s +
{{ form.city }} {% if form.city.errors %} {% for error in form.city.errors %}{{error}}{% endfor %}{% endif %} @@ -60,7 +60,7 @@
{% endif %}
- +
diff --git a/templates/locations/places/details.html b/templates/locations/places/details.html index 5073cb751a..48b5aedaff 100644 --- a/templates/locations/places/details.html +++ b/templates/locations/places/details.html @@ -8,15 +8,15 @@

{{ place.name }}

-
+
-
+

{{ place.address }}
{{ place.postal }} {{ place.city }}
{{ place.country.nameus }} -

+

{% if place.nbkm %}{{ place.nbkm }}km
{% endif %} diff --git a/templates/locations/places/list.html b/templates/locations/places/list.html index b4ca617bdf..5a4a7a2c31 100644 --- a/templates/locations/places/list.html +++ b/templates/locations/places/list.html @@ -1,4 +1,5 @@ {% extends "listing.html" %} +{% load has_group %} {% block datacontent %}
@@ -9,11 +10,13 @@
- - - + {% if request.user|has_group:"Trainer" %} + + + + {% endif %}
@@ -24,7 +27,9 @@ - + {% if request.user|has_group:"Trainer" %} + + {% endif %} @@ -37,11 +42,13 @@ {% for place in place_list %} - + {% if request.user|has_group:"Trainer" %} + + {% endif %} @@ -65,11 +72,17 @@
Name Address Zip
- - - - + + + + {{ place.name }} {{ place.address }} {{ place.postal}}