2021-11-02 14:05:32 +01:00
{% extends "base.html" %}
2021-11-17 10:39:16 +01:00
{% block page_title %}{{ gymnast.first_name }} {{ gymnast.last_name }}{% endblock %}
2021-11-02 14:05:32 +01:00
{% block content %}
< div class = "row" >
2021-12-28 10:25:29 +01:00
< div class = "col-12 col-sm-4 col-md-4 col-lg-4" >
2021-12-26 17:49:48 +01:00
< div class = "card card-user mb-4" >
2021-11-02 14:05:32 +01:00
< div class = "card-body" >
< div class = "author" >
< div class = "block block-one" > < / div >
< div class = "block block-two" > < / div >
< div class = "block block-three" > < / div >
< div class = "block block-four" > < / div >
< a href = "javascript:void(0)" >
2021-11-17 10:39:16 +01:00
{% if gymnast.picture %}
< img src = "{{ gymnast.picture.url }}" alt = "{{ gymnast }}" class = "avatar" >
2021-11-02 14:05:32 +01:00
{% endif %}
2021-11-17 10:39:16 +01:00
< h4 class = "title" > {{ gymnast.first_name }} {{ gymnast.last_name }}< / h4 >
2021-11-02 14:05:32 +01:00
< / a >
2021-12-13 15:51:07 +01:00
< p class = "description" >
{{ gymnast.club.name }}
< / p >
2021-11-02 14:05:32 +01:00
< / div >
< div class = "card-description" >
2021-12-13 15:51:07 +01:00
< b > {{ gymnast.age }} years< / b > ({{ gymnast.birthdate | date:"d F Y" }})< span class = "text-info" > < b > {{ gymnast.get_orientation_display }}< / b > < / span > < br / >
{% if height_weight %}
< b > {{ height_weight.0.height }}cm - {{ height_weight.0.weight }}kg< / b > ({{ height_weight.0.date | date:"d-m-Y" }})< br / >
{% endif %}
< b > {{ gymnast.trainings_by_week }} training/week< / b > for < b > {{ gymnast.hours_by_week }} hours/week< / b > < br / >
2021-11-18 21:36:15 +01:00
< br / >
2021-12-29 22:26:40 +01:00
2021-12-13 15:51:07 +01:00
< li > < b > Straight jump< / b > : < b > {{ best_straightjump.0.tof }}< / b > ({{ best_straightjump.0.date | date:"d-m-Y" }})< / li >
2021-12-08 15:01:09 +01:00
2021-12-13 15:51:07 +01:00
< li > < b > Routine< / b > : {% if best_routine %}< b > {{ best_routine.0.tof }}< / b > ({{ best_routine.0.date | date:"d-m-Y" }}){% else %} (no information){% endif %}< / li >
2021-12-29 22:26:40 +01:00
<!-- </ul> -->
2021-12-18 22:40:15 +01:00
2021-11-13 14:45:02 +01:00
< / div >
2021-11-02 14:05:32 +01:00
< / div >
< / div >
< / div >
2021-12-28 10:25:29 +01:00
<!-- <div class="col - 12 col - sm - 4 col - md - 4 col - lg - 3"></div> -->
2021-11-02 14:05:32 +01:00
< div class = "col-12 col-sm-4 col-md-4 col-lg-4" >
2021-12-26 17:49:48 +01:00
{% if gymnast_nb_known_skills %}
2021-12-28 10:25:29 +01:00
< canvas id = "chartjs_completude" style = "position: relative; height:40vh; width:80vw" > < / canvas >
2021-12-26 17:49:48 +01:00
{% endif %}
2021-11-02 14:05:32 +01:00
< / div >
2021-12-26 17:49:48 +01:00
< div class = "col-12 col-sm-4 col-md-4 card mb-4" >
{% if gymnast_nb_known_skills %}
2021-12-08 09:30:13 +01:00
< h4 class = "d-flex align-items-end flex-column" >
2021-12-08 15:01:09 +01:00
Estimated level : {% if gymnast_nb_known_skills %}{{ evaluated_level }}{% else %}0{% endif %}
2021-12-08 09:30:13 +01:00
< / h4 >
2021-12-08 15:01:09 +01:00
< div class = "progress-container progress-primary" >
< div class = "progress" style = "height: 10px;" >
< div class = "progress-bar progress-bar-warning" role = "progressbar" aria-valuenow = "60" aria-valuemin = "0" aria-valuemax = "100" style = "width: {{ percentage_known_skill }}%;" > < / div >
< / div >
< / div >
<!-- {{ nb_known_skill }} known skills on {{ nb_skill }} skills. -->
2021-12-09 13:50:39 +01:00
{% for level in percentages %}
{% if level.2 > 0 %}
2021-12-08 09:30:13 +01:00
< div class = "progress-container progress-warning mt-2" >
< div class = "progress" style = "height: 10px;" >
2021-12-09 13:50:39 +01:00
< div class = "progress-bar" role = "progressbar" aria-valuenow = "60" aria-valuemin = "0" aria-valuemax = "100" style = "width: {% widthratio level.2 level.1 100 %}%;" > Level {{ level.0 }}< / div >
2021-12-08 09:30:13 +01:00
< / div >
< / div >
{% endif %}
{% endfor %}
{% else %}
2021-12-26 17:49:48 +01:00
< p class = "text-muted mt-3" > No level/rank information.< / p >
2021-12-08 09:30:13 +01:00
{% endif %}
2021-11-02 14:05:32 +01:00
< / div >
2021-12-08 09:30:13 +01:00
2021-11-02 14:05:32 +01:00
< / div >
2021-11-26 14:52:16 +01:00
< div class = "row" >
2021-12-28 10:25:29 +01:00
< div class = "col-3 col-sm-1 col-md-1 col-lg-1 col-xl-1" >
2021-11-26 14:52:16 +01:00
< ul class = "nav nav-pills nav-pills-primary nav-pills-icons flex-column" >
2021-11-28 15:05:00 +01:00
< li class = "nav-item" >
2021-12-18 22:40:15 +01:00
< a class = "nav-link get-info{% if tab is None or tab == 'level' %} active{% endif %}" data-toggle = "tab" href = "#statistics" data-ref = "#statistics" data-url = "statistics/" id = "display_statistics" >
2021-12-19 21:14:04 +01:00
< i class = "tim-icons icon-sound-wave" > < / i > <!-- Level -->
2021-11-28 15:05:00 +01:00
< / a >
< / li >
2021-12-05 15:18:31 +01:00
< li class = "nav-item" >
2021-12-18 22:40:15 +01:00
< a class = "nav-link get-info{% if tab == 'routine' %} active{% endif %}" data-toggle = "tab" href = "#routine" data-ref = "#routine" data-url = "routine/" id = "display_routines" >
2021-12-19 21:14:04 +01:00
< i class = "tim-icons icon-components" > < / i > <!-- Routines -->
2021-12-05 15:18:31 +01:00
< / a >
< / li >
2021-11-26 14:52:16 +01:00
< li class = "nav-item" >
2021-12-18 22:40:15 +01:00
< a class = "nav-link get-info{% if tab == 'scores' %} active{% endif %}" data-toggle = "tab" href = "#scores" data-ref = "#scores" data-url = "scores_chrono/" id = "display_scores_chrono" >
2021-12-19 21:14:04 +01:00
< i class = "fal fa-crosshairs" > < / i > <!-- Scores -->
2021-11-26 14:52:16 +01:00
< / a >
< / li >
< li class = "nav-item" >
2021-12-18 22:40:15 +01:00
< a class = "nav-link get-info{% if tab == 'physiological' %} active{% endif %}" data-toggle = "tab" href = "#physiological" data-ref = "#physiological" data-url = "physiological/" id = "display_physiological" >
2021-12-19 21:14:04 +01:00
< i class = "fal fa-stethoscope" > < / i > <!-- Physical -->
2021-12-13 15:51:07 +01:00
< / a >
< / li >
2021-11-26 14:52:16 +01:00
< li class = "nav-item" >
2021-12-18 22:40:15 +01:00
< a class = "nav-link get-info{% if tab == 'event' %} active{% endif %}" data-toggle = "tab" href = "#event" data-ref = "#event" data-url = "event/" id = "display_event" >
2021-12-19 21:14:04 +01:00
< i class = "fal fa-calendar-day" > < / i > <!-- Events -->
2021-11-26 14:52:16 +01:00
< / a >
< / li >
< / ul >
< / div >
2021-12-26 17:49:48 +01:00
< div class = "col-12 col-sm-11 col-md-11 col-lg-11 pr-0" >
2021-11-26 14:52:16 +01:00
< div class = "tab-content" >
2021-12-18 22:40:15 +01:00
< div class = "tab-pane{% if tab is None or tab == 'level' %} active{% endif %}" id = "statistics" > < / div >
2021-11-26 14:52:16 +01:00
2021-12-18 22:40:15 +01:00
< div class = "tab-pane{% if tab == 'routine' %} active{% endif %}" id = "routine" > < / div >
2021-12-13 15:51:07 +01:00
2021-12-18 22:40:15 +01:00
< div class = "tab-pane{% if tab == 'scores' %} active{% endif %}" id = "scores" > < / div >
2021-11-27 17:14:09 +01:00
2021-12-18 22:40:15 +01:00
< div class = "tab-pane{% if tab == 'physiological' %} active{% endif %}" id = "physiological" > < / div >
2021-11-26 14:52:16 +01:00
2021-12-18 22:40:15 +01:00
< div class = "tab-pane{% if tab == 'event' %} active{% endif %}" id = "event" > < / div >
2021-11-26 14:52:16 +01:00
< / div >
< / div >
< / div >
2021-11-03 06:19:59 +01:00
{% endblock %}
2021-11-02 14:05:32 +01:00
2021-11-03 06:19:59 +01:00
{% block footerscript %}
2021-11-02 14:05:32 +01:00
< script type = "text/javascript" >
2021-11-27 17:14:09 +01:00
$(document).ready(function() {
var default_url = '/gymnast/' + {{ gymnast.id }} + '/';
{% if tab is None or tab == 'level' %}
tab_url = default_url + 'statistics/';
var tab_div = '#statistics';
{% elif tab == 'routine' %}
tab_url = default_url + 'routine/';
var tab_div = '#routine';
{% elif tab == 'scores' %}
tab_url = default_url + 'scores_chrono/';
var tab_div = '#scores';
{% elif tab == 'event' %}
tab_url = default_url + 'event/';
var tab_div = '#event';
{% endif %}
$.ajax({
url: tab_url,
dataType: "html",
success: function(data) {
$(tab_div).replaceWith($(tab_div).html(data));
},
error: function (exception) {
console.log(exception);
}
});
$('.get-info').click(function(){
$.ajax({
url: default_url + $(this).data("url"),
dataType: "html",
context: $(this),
success: function(data) {
$($(this).data("ref")).replaceWith($($(this).data("ref")).html(data));
},
error: function (exception) {
console.log(exception);
}
});
});
});
2021-12-28 10:25:29 +01:00
var completude_data = {
datasets:[{
borderWidth: 0,
data: [
{{ nb_skill_chained }},
{{ nb_skill_not_chained }},
{{ nb_skill_whith_help }},
{{ nb_unknown_skill }}
],
backgroundColor: [
"#1BC98E", /*"#1ca8dd",*/
"#FEFB01",
"#FF9300",
"#FF2F92", /*"#1bc98e"*/
// "#1CA8DD",
]
}],
labels: ['Chained skills ', 'Unchained Skills ', ' Helped Skills', 'Unknown Skills'],
};
2021-11-03 06:19:59 +01:00
2021-12-08 15:01:09 +01:00
new Chart(document.getElementById("chartjs_completude"),{
2021-12-28 10:25:29 +01:00
responsive: true,
maintainAspectRatio: true,
2021-12-08 15:01:09 +01:00
type: "doughnut",
2021-12-28 10:25:29 +01:00
data: completude_data,
2021-12-08 15:01:09 +01:00
options: {
legend: {
display: false,
},
cutoutPercentage: 55,
maintainAspectRatio: false,
},
});
2021-11-02 14:05:32 +01:00
< / script >
{% endblock %}