Minor update
This commit is contained in:
parent
0541fa6be3
commit
8915a390f3
|
@ -81,7 +81,7 @@
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body pb-0">
|
<div class="card-body pt-0">
|
||||||
{% if injury_list %}
|
{% if injury_list %}
|
||||||
<table class="table tablesorter table-striped table-condensed" id="injury_table">
|
<table class="table tablesorter table-striped table-condensed" id="injury_table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -4,42 +4,58 @@
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6 pl-0">
|
<div class="col-md-6 pl-0">
|
||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
<div class="card-header">
|
<div class="card-header row">
|
||||||
<h4>Scores</h4>
|
<div class="col-8">
|
||||||
|
<h4>Scores</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 text-right">
|
||||||
|
<h3 class="mb-0">
|
||||||
|
{% if score_list %}
|
||||||
|
<a href="{% url 'score_list_for_gymnast' gymnast_id %}">
|
||||||
|
<i class="fal fa-crosshairs text-warning"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if request.user|has_group:"trainer" or request.user|is_user_equal_to_gymnast:gymnast_id %}
|
||||||
|
<a href="{% url 'score_create_for_gymnast' gymnast_id %}">
|
||||||
|
<i class="fas fa-plus text-warning"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
</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 score_list %}
|
{% if score_list %}
|
||||||
<div><canvas id="chart_score_competition" class="chartjs" width="400" height="200"></canvas></div>
|
<div><canvas id="chart_score_competition" class="chartjs" width="400" height="200"></canvas></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="pl-3 text-muted">No score recorded for this gymnast.</p>
|
<p class="pl-3 text-muted">No score recorded for this gymnast.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer text-right text-muted pt-0">
|
|
||||||
{% if score_list %}
|
|
||||||
<a href="{% url 'score_list_for_gymnast' gymnast_id %}">
|
|
||||||
<button type="submit" value="add" class="btn btn-icon btn-warning mr-2">
|
|
||||||
<i class="fal fa-crosshairs"></i>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if request.user|has_group:"trainer" or request.user|is_user_equal_to_gymnast:gymnast_id %}
|
|
||||||
<a href="{% url 'score_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>
|
</div>
|
||||||
<div class="col-md-6 pl-0">
|
<div class="col-md-6 pl-0">
|
||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
<div class="card-header">
|
<div class="card-header row">
|
||||||
<h4>Routine's statistics</h4>
|
<div class="col-8">
|
||||||
|
<h4>Routine's statistics</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 text-right">
|
||||||
|
<h3 class="mb-0">
|
||||||
|
{% if routine_one_done_list or routine_two_done_list %}
|
||||||
|
<a href="{% url 'routinedone_list_for_gymnast' gymnast_id %}">
|
||||||
|
<i class="far fa-chart-bar text-warning"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if request.user|has_group:"trainer" or request.user|is_user_equal_to_gymnast:gymnast_id %}
|
||||||
|
<a href="{% url 'routinedone_create_for_gymnast' gymnast_id %}">
|
||||||
|
<i class="fas fa-plus text-warning"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body pt-0 pb-0 pr-0 pl-0">
|
<div class="card-body p-0">
|
||||||
{% if routine_one_done_list or routine_two_done_list %}
|
{% if routine_one_done_list or routine_two_done_list %}
|
||||||
<div><canvas id="chart_routine_done" class="chartjs" width="400" height="200"></canvas></div>
|
<div><canvas id="chart_routine_done" class="chartjs" width="400" height="200"></canvas></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -84,23 +100,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="col-md-6 {% if not ghr_list %}offset-md-6{% endif %} text-right text-muted pt-0">
|
|
||||||
{% if routine_one_done_list or routine_two_done_list %}
|
|
||||||
<a href="{% url 'routinedone_list_for_gymnast' gymnast_id %}">
|
|
||||||
<button type="submit" value="list" class="btn btn-icon btn-warning mr-2">
|
|
||||||
<i class="far fa-chart-bar"></i>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if request.user|has_group:"trainer" or request.user|is_user_equal_to_gymnast:gymnast_id %}
|
|
||||||
<a href="{% url 'routinedone_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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -128,11 +127,9 @@
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body pb-0 pr-0 pl-0">
|
<div class="card-body pt-0 pr-0 pl-0">
|
||||||
{% if ghr_list %}
|
{% if ghr_list %}
|
||||||
<div class="pr-1 pl-1">
|
<div class="pr-1 pl-1">
|
||||||
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="routine_table">
|
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="routine_table">
|
||||||
|
@ -171,17 +168,11 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#routine_table').tablesorter({
|
$('#routine_table').tablesorter({
|
||||||
// headers: {
|
|
||||||
// 0: { sorter: false }, // disable first column
|
|
||||||
// },
|
|
||||||
dateFormat : "ddmmyyyy",
|
dateFormat : "ddmmyyyy",
|
||||||
sortList: [[0, 0],]
|
sortList: [[0, 0],]
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#stats_table').tablesorter({
|
$('#stats_table').tablesorter({
|
||||||
// headers: {
|
|
||||||
// 0: { sorter: false }, // disable first column
|
|
||||||
// },
|
|
||||||
dateFormat : "ddmmyyyy",
|
dateFormat : "ddmmyyyy",
|
||||||
sortList: [[0, 1],]
|
sortList: [[0, 1],]
|
||||||
});
|
});
|
||||||
|
@ -197,10 +188,7 @@
|
||||||
csrfmiddlewaretoken: '{{ csrf_token }}'
|
csrfmiddlewaretoken: '{{ csrf_token }}'
|
||||||
},
|
},
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
//
|
|
||||||
// RELOAD DE L'ONGLET
|
// RELOAD DE L'ONGLET
|
||||||
//
|
|
||||||
//
|
|
||||||
location.reload(); // recharge TOUTE la page... Overkill !
|
location.reload(); // recharge TOUTE la page... Overkill !
|
||||||
// tab_url = {% url 'gymnast_details_tab' gymnast_id 'routine' %};
|
// tab_url = {% url 'gymnast_details_tab' gymnast_id 'routine' %};
|
||||||
// tab_div = '#routine';
|
// tab_div = '#routine';
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
<div class="tab-content tab-space tab-subcategories p-0">
|
<div class="tab-content tab-space tab-subcategories p-0">
|
||||||
{% if planned_skill %}
|
{% if planned_skill %}
|
||||||
<div class="tab-pane {% if planned_skill %}active{% endif %}" id="planned_skill">
|
<div class="tab-pane {% if planned_skill %}active{% endif %}" id="planned_skill">
|
||||||
<table class="table table-condensed table-striped tablesorter" id="table_planned_skill">
|
<table class="table table-condensed table-striped tablesorter m-0 p-0" id="table_planned_skill">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 15%"></th>
|
<th style="width: 15%"></th>
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
|
|
||||||
{% if confused_skill %}
|
{% if confused_skill %}
|
||||||
<div class="tab-pane {% if confused_skill and not planned_skill %}active{% endif %}" id="confused_skill">
|
<div class="tab-pane {% if confused_skill and not planned_skill %}active{% endif %}" id="confused_skill">
|
||||||
<table class="table table-striped table-condensed tablesorter" id="table_confused_skill">
|
<table class="table table-striped table-condensed tablesorter m-0 p-0" id="table_confused_skill">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 10%"></th>
|
<th style="width: 10%"></th>
|
||||||
|
@ -196,7 +196,7 @@
|
||||||
|
|
||||||
{% if skill_whith_help %}
|
{% if skill_whith_help %}
|
||||||
<div class="tab-pane {% if skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_whith_help">
|
<div class="tab-pane {% if skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_whith_help">
|
||||||
<table class="table table-striped table-condensed tablesorter" id="table_skill_with_help">
|
<table class="table table-striped table-condensed tablesorter m-0 p-0" id="table_skill_with_help">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 10%"></th>
|
<th style="width: 10%"></th>
|
||||||
|
@ -240,7 +240,7 @@
|
||||||
|
|
||||||
{% if skill_without_help %}
|
{% if skill_without_help %}
|
||||||
<div class="tab-pane {% if skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_without_help">
|
<div class="tab-pane {% if skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_without_help">
|
||||||
<table class="table table-striped table-condensed tablesorter" id="table_skill_without_help">
|
<table class="table table-striped table-condensed tablesorter m-0 p-0" id="table_skill_without_help">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 12%"></th>
|
<th style="width: 12%"></th>
|
||||||
|
@ -284,7 +284,7 @@
|
||||||
|
|
||||||
{% if skill_chained %}
|
{% if skill_chained %}
|
||||||
<div class="tab-pane {% if skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_chained">
|
<div class="tab-pane {% if skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_chained">
|
||||||
<table class="table table-striped table-condensed tablesorter" id="table_skill_chained">
|
<table class="table table-striped table-condensed tablesorter m-0 p-0" id="table_skill_chained">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 12%"></th>
|
<th style="width: 12%"></th>
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
|
|
||||||
{% if skill_masterised %}
|
{% if skill_masterised %}
|
||||||
<div class="tab-pane {% if skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_masterised">
|
<div class="tab-pane {% if skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_masterised">
|
||||||
<table class="table table-striped table-condensed tablesorter" id="table_skill_masterised">
|
<table class="table table-striped table-condensed tablesorter m-0 p-0" id="table_skill_masterised">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 12%"></th>
|
<th style="width: 12%"></th>
|
||||||
|
@ -372,7 +372,7 @@
|
||||||
|
|
||||||
{% if skill_by_rank %}
|
{% if skill_by_rank %}
|
||||||
<div class="tab-pane {% if skill_by_rank and not skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_by_rank">
|
<div class="tab-pane {% if skill_by_rank and not skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_by_rank">
|
||||||
<table class="table table-striped table-condensed tablesorter" id="table_by_rank">
|
<table class="table table-striped table-condensed tablesorter m-0 p-0" id="table_by_rank">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 13%">Actions</th>
|
<th style="width: 13%">Actions</th>
|
||||||
|
@ -420,7 +420,7 @@
|
||||||
|
|
||||||
{% if skill_by_level %}
|
{% if skill_by_level %}
|
||||||
<div class="tab-pane {% if skill_by_level and not skill_by_rank and not skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_by_level">
|
<div class="tab-pane {% if skill_by_level and not skill_by_rank and not skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_by_level">
|
||||||
<table class="table table-striped table-condensed tablesorter" id="table_by_level">
|
<table class="table table-striped table-condensed tablesorter m-0 p-0" id="table_by_level">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 15%">Actions</th>
|
<th style="width: 15%">Actions</th>
|
||||||
|
@ -468,7 +468,7 @@
|
||||||
|
|
||||||
{% if skill_by_age %}
|
{% if skill_by_age %}
|
||||||
<div class="tab-pane {% if skill_by_age and not skill_by_level and not skill_by_rank and not skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_by_age">
|
<div class="tab-pane {% if skill_by_age and not skill_by_level and not skill_by_rank and not skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="skill_by_age">
|
||||||
<table class="table table-striped table-condensed tablesorter" id="table_by_age">
|
<table class="table table-striped table-condensed tablesorter m-0 p-0" id="table_by_age">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 15%">Actions</th>
|
<th style="width: 15%">Actions</th>
|
||||||
|
@ -517,15 +517,15 @@
|
||||||
|
|
||||||
{% if unknown_skill %}
|
{% if unknown_skill %}
|
||||||
<div class="tab-pane {% if unknown_skill and not skill_by_age and not skill_by_level and not skill_by_rank and not skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="unknown_skill">
|
<div class="tab-pane {% if unknown_skill and not skill_by_age and not skill_by_level and not skill_by_rank and not skill_masterised and not skill_chained and not skill_without_help and not skill_whith_help and not confused_skill and not planned_skill %}active{% endif %}" id="unknown_skill">
|
||||||
<table class="table tablesorter table-striped" data-sort="table" id="table_unknown_skill">
|
<table class="table tablesorter table-striped m-0 p-0" data-sort="table" id="table_unknown_skill" style="width: 100%">
|
||||||
<thead class="text-primary">
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Actions</th>
|
<th class="header">Actions</th>
|
||||||
<th>Notation</th>
|
<th class="header">Notation</th>
|
||||||
<th class="text-left">Label</th>
|
<th class="header text-left">Label</th>
|
||||||
<th class="not-displayed-on-phone">Diff.</th>
|
<th class="header not-displayed-on-phone">Diff.</th>
|
||||||
<th class="not-displayed-on-phone">Level</th>
|
<th class="header not-displayed-on-phone">Level</th>
|
||||||
<th class="not-displayed-on-phone">Rank</th>
|
<th class="header not-displayed-on-phone">Rank</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -579,7 +579,7 @@
|
||||||
$('.checkUnknownSkill').click(function(){
|
$('.checkUnknownSkill').click(function(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// TODO: chande hardcoded url
|
// TODO: chande hardcoded url
|
||||||
url: '/follow-up/learnedskill/new/',
|
url: '{% url "gymnast_learn_skill" %}',
|
||||||
data: {
|
data: {
|
||||||
gymnast_id: $(this).data('gymnast_id'),
|
gymnast_id: $(this).data('gymnast_id'),
|
||||||
skill_id: $(this).data('skill_id'),
|
skill_id: $(this).data('skill_id'),
|
||||||
|
@ -625,14 +625,16 @@
|
||||||
sortList: [[3, 0], [6,0], [5,0], [3, 0]]
|
sortList: [[3, 0], [6,0], [5,0], [3, 0]]
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: faire fonctionner le DataTable pour pouvoir limiter la hauteur du div.
|
// $('#table_by_rank, #table_by_level, #table_by_age, #table_unknown_skill, #table_skill_with_help, #table_skill_without_help, #table_skill_chained').DataTable({
|
||||||
// $('#table_by_age').DataTable({
|
// scrollY: '65vh',
|
||||||
// scrollY: '57.3vh',
|
// });
|
||||||
// scrollCollapse: true,
|
|
||||||
// paging: false,
|
// $('#table_skill_chained').DataTable({
|
||||||
// searching: false,
|
// searching: false,
|
||||||
|
// // scrollY: '60vh',
|
||||||
// ordering: false,
|
// ordering: false,
|
||||||
// "bInfo": false,
|
// paging: false,
|
||||||
|
// info: false,
|
||||||
// });
|
// });
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue