Minor interface update

This commit is contained in:
Gregory Trullemans 2024-04-19 09:32:41 +02:00
parent 814eb60a11
commit 170eecd104
6 changed files with 120 additions and 108 deletions

View File

@ -213,7 +213,7 @@
</div>
<div class="row">
<div class="col-12">
<h4 class="mb-1">Injury</h4>
<h4 class="mb-1">Injury {% if injury_list %}({{ injury_list.count }}){% endif %}</h4>
{% if injury_list %}
<table class="table" id="injury_table">
<thead class="text-primary">

View File

@ -81,7 +81,7 @@
<div class="card-header">
<h4>Training Program</h4>
</div>
<div class="card-body pt-0 pb-0">
<div class="card-body pt-0">
{% if date_list %}
{% for date in date_list %}
<a href="{% url 'trainingprogram_details' date gymnast_id %}">{{ date|date:"l j F Y" }}</a>

View File

@ -31,10 +31,19 @@
<div class="row justify-content-center">
<div class="col-md-6 pl-0">
<div class="card">
<div class="card-header">
<h4>Next events</h4>
<div class="card-header row">
<div class="col-8">
<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>
</div>
</div>
<div class="card-body pt-0 pb-0">
<div class="card-body">
{% if next_event_list %}
<table class="table tablesorter table-condensed table-striped" id="next_events">
<thead>
@ -66,22 +75,32 @@
<p class="text-muted">No next event associated to this gymnast.</p>
{% endif %}
</div>
<div class="card-footer text-right text-muted pt-0">
<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>
</div>
</div>
</div>
<div class="col-md-6 pl-0">
<div class="card">
<div class="card-header">
<h4>Last notes</h4>
<div class="card-header row">
<div class="col-8">
<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 %}
</div>
</div>
<div class="card-body pt-0 pb-0 pr-1 pl-1">
<div class="card-body pb-0 pr-1 pl-1">
{% if last_notes_list %}
<table class="table tablesorter table-condensed table-striped" id="notes">
<thead>
@ -123,21 +142,6 @@
<p class="pl-2 text-muted">No note for this gymnast.</p>
{% endif %}
</div>
<div class="card-footer text-right text-muted pt-0">
<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 %}
</div>
</div>
</div>
</div>

View File

@ -2,71 +2,91 @@
<div class="row justify-content-center">
<div class="col-md-6 pl-0">
<div class="card mb-3">
<div class="card-header">
<h4>Height/Weight</h4>
<div class="card-header row">
<div class="col-8">
<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>
</div>
</div>
<div class="card-body pt-0 pb-0 pr-0 pl-0">
<div class="card-body pt-0 pr-0 pl-0">
{% if height_weight_list %}
<div><canvas id="chart_height_weight" class="chartjs" width="400" height="200"></canvas></div>
<div><canvas id="chart_height_weight" class="chartjs"></canvas></div>
{% else %}
<p class="pl-3 text-muted">No height/weight recorded for this gymnast.</p>
{% endif %}
</div>
<div class="card-footer text-right text-muted pt-0">
{% 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>
</div>
</div>
</div>
<div class="col-md-6 pl-0">
<div class="card mb-3">
<div class="card-header">
<h4>Well Being</h4>
<div class="card-header row">
<div class="col-8">
<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>
</div>
</div>
<div class="card-body pt-0 pb-0 pr-0 pl-0">
<div class="card-body pt-0 pr-0 pl-0">
{% if wellbeing_list %}
<div><canvas id="chart_wellbeing" class="chartjs" width="400" height="200"></canvas></div>
<div><canvas id="chart_wellbeing" class="chartjs"></canvas></div>
{% else %}
<p class="pl-3 text-muted">No well being recorded for this gymnast.</p>
{% endif %}
</div>
<div class="card-footer text-right text-muted pt-0">
{% 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>
</div>
</div>
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-12 pl-0">
<div class="card">
<div class="card-header">
<h4>Injuries <i>on last two month</i></h4>
<div class="card-header row">
<div class="col-10">
<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>
</div>
</div>
<div class="card-body pt-0 pb-0">
<div class="card-body pb-0">
{% if injury_list %}
<table class="table tablesorter table-striped table-condensed" id="injury_table">
<thead>
@ -104,20 +124,6 @@
<p class="text-muted">No injury known for this gymnast.</p>
{% endif %}
</div>
<div class="card-footer text-right text-muted pt-0">
{% 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>
</div>
</div>
</div>
</div>

View File

@ -109,10 +109,29 @@
<div class="row justify-content-center">
<div class="col-md-12 pl-0">
<div class="card">
<div class="card-header">
<h4>Active routines</h4>
<div class="card-header row">
<div class="col-8">
<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 %}
{% 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 pt-0 pb-0 pr-0 pl-0">
<div class="card-body pb-0 pr-0 pl-0">
{% if ghr_list %}
<div class="pr-1 pl-1">
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="routine_table">
@ -140,23 +159,6 @@
<p class="pl-3 text-muted">There are no routines associated to this gymnast.</p>
{% endif %}
</div>
<div class="card-footer text-right text-muted pt-0">
{% 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 %}
{% 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>
</div>

View File

@ -214,7 +214,7 @@ def gymnast_display_events_and_notes(request, gymnast_id):
"latest_published_note": latest_published_note,
"gymnast_id": gymnast_id,
}
return render(request, "gymnasts/tabs/tab_events_and_notes.html", context)
return render(request, "gymnasts/tabs/tab_notes_events.html", context)
@login_required
@ -282,7 +282,7 @@ def gymnast_display_scores_chrono(request, gymnast_id):
"chrono_rf": base_queryset.filter(chrono_type=3),
"gymnast_id": gymnast_id,
}
return render(request, "gymnasts/tabs/tab_intensity_and_chronos.html", context)
return render(request, "gymnasts/tabs/tab_intensity_chronos_programs.html", context)
@login_required
@ -328,7 +328,7 @@ def gymnast_display_routine_statistics(request, gymnast_id):
"score_routine3_list": score_list.filter(routine_type=3),
"gymnast_id": gymnast_id,
}
return render(request, "gymnasts/tabs/tab_routines_and_scores.html", context)
return render(request, "gymnasts/tabs/tab_routines_scores.html", context)
@login_required