From 1e512990fbcb1d256f325acc27e6fabb9430c85c Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Mon, 7 Feb 2022 12:09:29 +0100 Subject: [PATCH] Gymnast User finished --- README.md | 11 +++++ templates/people/gymnasts/details.html | 19 +++++--- templates/people/gymnasts/list_mindstate.html | 14 ++++-- templates/people/gymnasts/list_routine.html | 27 +++++++---- .../people/gymnasts/list_scores_chronos.html | 47 +++++++++++-------- templates/people/gymnasts/list_skill.html | 44 ++++++++++++++--- .../templatetags/is_user_equal_to_gymnast.py | 9 ++++ 7 files changed, 123 insertions(+), 48 deletions(-) create mode 100644 ultron/tools/templatetags/is_user_equal_to_gymnast.py diff --git a/README.md b/README.md index f658e45642..41b5af73ce 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,17 @@ Peut tout faire sauf : - Gérer les Pays - Gérer les lieux +##### Gymnaste + +Un gymnaste peut tout faire pour *lui-même* : + +- Ajouter un chrono +- Ajouter un score +- Ajouter un height/weight +- … + + + ### Skill ### Learned Skill diff --git a/templates/people/gymnasts/details.html b/templates/people/gymnasts/details.html index 909b5876a3..ceb57ba0cd 100644 --- a/templates/people/gymnasts/details.html +++ b/templates/people/gymnasts/details.html @@ -2,6 +2,8 @@ {% load skill_doughnut %} {% load level_chart_bar %} +{% load has_group %} +{% load is_user_equal_to_gymnast %} {% block page_title %}{{ gymnast.first_name }} {{ gymnast.last_name }}{% endblock %} @@ -81,11 +83,13 @@ - + {% if request.user|has_group:"Trainer" or request.user|is_user_equal_to_gymnast:gymnast.id %} + + {% endif %}