Update button's interface

This commit is contained in:
Gregory Trullemans 2024-04-20 13:51:22 +02:00
parent 48062fbc5b
commit 0c98a8d3db
5 changed files with 71 additions and 77 deletions

View File

@ -7,19 +7,17 @@
<h4>Height/Weight</h4>
</div>
<div class="col-4 text-right">
{% if height_weight_list %}
<a href="{% url 'heightweight_list_for_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fal fa-weight"></i>
</button>
</a>
{% endif %}
<a href="{% url 'heightweight_create_for_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fas fa-plus"></i>
</button>
</a>
<h3 class="mb-0">
{% if height_weight_list %}
<a href="{% url 'heightweight_list_for_gymnast' gymnast_id %}">
<i class="far fa-weight text-warning"></i>
</a>
{% endif %}
&nbsp;
<a href="{% url 'heightweight_create_for_gymnast' gymnast_id %}">
<i class="fas fa-plus text-warning"></i>
</a>
</h3>
</div>
</div>
<div class="card-body pt-0 pr-0 pl-0">
@ -39,19 +37,17 @@
<h4>Well Being</h4>
</div>
<div class="col-4 text-right">
{% if wellbeing_list %}
<a href="{% url 'wellbeing_list_for_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fal fa-file-medical-alt"></i>
</button>
</a>
{% endif %}
<a href="{% url 'wellbeing_create_for_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fas fa-plus"></i>
</button>
</a>
<h3 class="mb-0">
{% if wellbeing_list %}
<a href="{% url 'wellbeing_list_for_gymnast' gymnast_id %}">
<i class="far fa-file-medical-alt text-warning"></i>
</a>
{% endif %}
&nbsp;
<a href="{% url 'wellbeing_create_for_gymnast' gymnast_id %}">
<i class="fas fa-plus text-warning"></i>
</a>
</h3>
</div>
</div>
<div class="card-body pt-0 pr-0 pl-0">
@ -72,18 +68,17 @@
<h4>Injuries <i>on last two month ({{ injury_list.count }})</i></h4>
</div>
<div class="col-2 text-right">
{% if injury_list %}
<a href="{% url 'injury_list_for_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fal fa-comment-alt-medical"></i>
</button>
</a>
{% endif %}
<a href="{% url 'injury_create_for_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fas fa-plus"></i>
</button>
</a>
<h3 class="mb-0">
{% if injury_list %}
<a href="{% url 'injury_list_for_gymnast' gymnast_id %}">
<i class="far fa-comment-alt-medical text-warning"></i>
</a>
&nbsp;
{% endif %}
<a href="{% url 'injury_create_for_gymnast' gymnast_id %}">
<i class="fas fa-plus text-warning"></i>
</a>
</h3>
</div>
</div>
<div class="card-body pb-0">

View File

@ -12,9 +12,9 @@
</div>
{% if request.user.id == latest_published_note.coach.id %}
<div class="col-1 ml-auto text-right">
<a href="{% url 'note_update' latest_published_note.id %}">
<span class="fas fa-pencil text-warning"></span>
</a>
<h3><a href="{% url 'note_update' latest_published_note.id %}">
<span class="far fa-pencil text-warning"></span>
</a></h3>
</div>
{% endif %}
</div>
@ -36,11 +36,9 @@
<h4>Next events</h4>
</div>
<div class="col-4 text-right">
<a href="{% url 'event_list_for_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fal fa-calendar-alt"></i>
</button>
</a>
<h3 class="mb-0"><a href="{% url 'event_list_for_gymnast' gymnast_id %}">
<i class="far fa-calendar-alt text-warning"></i>
</a></h3>
</div>
</div>
<div class="card-body">
@ -85,19 +83,17 @@
<h4>Last notes</h4>
</div>
<div class="col-4 text-right">
<a href="{% url 'note_list_for_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fal fa-comment-alt-lines"></i>
</button>
</a>
{% if request.user|has_group:"trainer" %}
<a href="{% url 'note_create_for_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fas fa-plus"></i>
</button>
</a>
{% endif %}
<h3 class="mb-0">
<a href="{% url 'note_list_for_gymnast' gymnast_id %}">
<i class="far fa-comment-alt-lines text-warning"></i>
</a>
{% if request.user|has_group:"trainer" %}
&nbsp;
<a href="{% url 'note_create_for_gymnast' gymnast_id %}">
<i class="fas fa-plus text-warning"></i>
</a>
{% endif %}
</h3>
</div>
</div>
<div class="card-body pb-0 pr-1 pl-1">

View File

@ -114,21 +114,22 @@
<h4>Active routines</h4>
</div>
<div class="col-4 text-right">
{% if ghr_list %}
<a href="{% url 'routine_list_for_gymnast' gymnast_id %}">
<button type="submit" value="list" class="btn btn-icon btn-warning mr-2">
<i class="tim-icons icon-components"></i> <!-- Routines -->
</button>
</a>
{% endif %}
<h3 class="mb-0">
{% if ghr_list %}
<a href="{% url 'routine_list_for_gymnast' gymnast_id %}">
<i class="tim-icons icon-components text-warning"></i> <!-- Routines -->
</a>
{% endif %}
{% if request.user|has_group:"trainer" or request.user|is_user_equal_to_gymnast:gymnast_id %}
&nbsp;
<a href="{% url 'link_routine_to_gymnast' gymnast_id %}">
<i class="fas fa-plus text-warning"></i>
</a>
{% endif %}
</h3>
{% if request.user|has_group:"trainer" or request.user|is_user_equal_to_gymnast:gymnast_id %}
<a href="{% url 'link_routine_to_gymnast' gymnast_id %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fas fa-plus"></i>
</button>
</a>
{% endif %}
</div>
</div>
<div class="card-body pb-0 pr-0 pl-0">

View File

@ -11,9 +11,11 @@
{% if request.user|has_group:"trainer" %}
<div class="col-1 ml-auto">
<div class="text-right">
<a href="{% url 'season_information_create_for_gymnast' gymnast.id %}">
<i class="fas fa-plus text-danger"></i>
</a>
<h3 class="mb-0">
<a href="{% url 'season_information_create_for_gymnast' gymnast.id %}">
<i class="fas fa-plus text-warning"></i>
</a>
</h3>
</div>
</div>
{% endif %}

View File

@ -249,7 +249,7 @@ def gymnast_display_physiological(request, gymnast_id):
"gymnast_id": gymnast_id,
}
return render(
request, "gymnasts/tabs/tab_physiological_and_wellbeing.html", context
request, "gymnasts/tabs/tab_height_weight_wellbeing_injury.html", context
)