Jarvis/jarvis/followup/templates/intensities/list.html

150 lines
7.2 KiB
HTML
Raw Normal View History

2023-04-25 17:06:14 +02:00
{% extends "listing.html" %}
{% block datacontent %}
<div class="card mb-0">
<div class="card-header">
<div class="row">
<div class="col-8">
2024-01-24 13:15:48 +01:00
<h4 class="">
2024-04-19 11:01:23 +02:00
{% if gymnast %}
2024-04-21 18:37:20 +02:00
{% if gymnast.id in request.session.available_gymnast or request.user.is_superuser %}<a href="{% url 'gymnast_details_tab' gymnast.id 'routine' %}">{% endif %}{{ gymnast }}{% if gymnast.id in request.session.available_gymnast or request.user.is_superuser %}</a>{% endif %}'s
2024-04-19 11:01:23 +02:00
{% endif %} Intensities
2024-01-24 13:15:48 +01:00
</h4>
2023-04-25 17:06:14 +02:00
</div>
<div class="col-1 ml-auto">
<div class="text-right">
<a href="{% if gymnast %}{% url 'intensity_create_for_gymnast' gymnast.id %}{% else %}{% url 'intensity_create' %}{% endif %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fas fa-plus"></i>
</button>
</a>
</div>
</div>
</div>
</div>
2024-04-20 20:00:53 +02:00
<div class="card-body pt-0 pb-0">
<div class="table-responsive pb-0">
2023-04-25 17:06:14 +02:00
{% if intensity_list %}
<table class="table table-striped tablesorter" id="intensity_table">
<thead>
<tr>
<th style="width: 3%">&nbsp;</th>
2023-11-22 10:09:51 +01:00
<th style="width: 8%" class="header">Date</th>
2024-02-03 17:47:03 +01:00
{% if not gymnast %}
2024-03-01 13:52:54 +01:00
<th style="width: 18%" class="header text-left">Gymnast</th>
2024-02-03 17:44:40 +01:00
{% endif %}
2023-11-22 10:48:31 +01:00
2024-02-03 18:51:57 +01:00
<th style="width: 7%" class="header text-center">Time</th>
<th style="width: 7%" class="header text-center">Diff</th>
<th style="width: 7%" class="header text-center">Skill</th>
<th style="width: 7%" class="header text-center">Passe</th>
2024-02-03 18:28:38 +01:00
<th style="width: 7%" class="header text-center">Quality</th>
2024-02-03 18:25:33 +01:00
2023-11-22 16:29:56 +01:00
<th style="width: 7%" class="header text-center">T/p</th><!-- Time by passe -->
<th style="width: 7%" class="header text-center">D/p</th><!-- Difficulty by passe -->
<th style="width: 7%" class="header text-center">S/p</th><!-- # skill by passe -->
<th style="width: 7%" class="header text-center">D/S</th><!-- Difficulty by skill -->
2024-02-04 08:00:13 +01:00
<!-- <th style="width: 7%" class="header text-center">S/T</th>Skill by time -->
2023-04-25 17:06:14 +02:00
</tr>
</thead>
<tbody>
{% for intensity in intensity_list %}
<tr role="row" class="{% cycle 'odd' 'even' %}">
<td>
<a href="{% url 'intensity_update' intensity.id %}">
<span class="tim-icons icon-pencil text-warning"></span>
</a>
</td>
2024-02-11 16:56:12 +01:00
<td><a href="{% url 'intensity_details' intensity.id %}">{{ intensity.date | date:"j-n-Y" }}</a></td>
2024-02-03 17:47:03 +01:00
{% if not gymnast %}
2023-04-25 17:06:14 +02:00
<td class="text-left">
2024-02-11 12:18:11 +01:00
{% if intensity.gymnast.id in request.session.available_gymnast or request.user.is_superuser %}<a href="{% url 'gymnast_details_tab' intensity.gymnast.id 'routine' %}">{% endif %}
2023-04-25 17:06:14 +02:00
{{ intensity.gymnast }}
</a>
</td>
2024-02-03 17:44:40 +01:00
{% endif %}
2023-11-22 10:48:31 +01:00
2024-04-21 18:37:20 +02:00
<td class="text-center">{{ intensity.time_quality | floatformat:0 }}%</td>
<td class="text-center">{{ intensity.difficulty_quality | floatformat:0 }}%</td>
<td class="text-center">{{ intensity.quantity_of_skill_quality | floatformat:0 }}%</td>
<td class="text-center">{{ intensity.number_of_passes_quality | floatformat:0 }}%</td>
2024-02-04 08:00:13 +01:00
<td class="text-center">
2024-02-03 18:28:38 +01:00
<b>
2024-02-17 18:49:48 +01:00
{% if intensity.average_training_quality <= 85.0 %}
2024-04-19 11:01:23 +02:00
<span class="text-danger">
2024-02-17 18:49:48 +01:00
{% elif intensity.average_training_quality <= 95.0 %}
2024-04-19 11:01:23 +02:00
<span class="text-warning">
2024-02-03 18:28:38 +01:00
{% else %}
2024-04-19 11:01:23 +02:00
<span class="text-success">
2024-02-03 18:28:38 +01:00
{% endif %}
2024-04-19 11:01:23 +02:00
{{ intensity.average_training_quality | floatformat:1 }}%</span>
2024-02-03 18:28:38 +01:00
</b>
</td>
2023-11-22 10:48:31 +01:00
2024-02-05 16:51:55 +01:00
<!-- Time by passe -->
<td class="text-center">
2023-11-22 11:09:47 +01:00
<b>
2024-02-05 16:51:55 +01:00
{% if intensity.passes_quality_for_gymnast >= 3 %}
2024-04-19 11:01:23 +02:00
<span class="text-danger">
2024-02-05 16:51:55 +01:00
{% elif intensity.passes_quality_for_gymnast == 2 %}
2024-04-19 11:01:23 +02:00
<span class="text-warning">
{% else %}
2024-04-19 11:01:23 +02:00
<span class="text-success">
{% endif %}
2024-04-19 11:01:23 +02:00
{{ intensity.average_time_by_passe_readable }}</span>
2023-11-22 11:09:47 +01:00
</b>
</td>
2024-02-04 08:43:02 +01:00
<!-- Difficulty by passe -->
<td class="text-center">
2024-02-16 06:19:28 +01:00
{{ intensity.average_difficulty_by_passe_in_unit | floatformat:2 }}
2024-02-04 08:43:02 +01:00
</td>
<!-- # skill by passe -->
2024-02-04 08:45:45 +01:00
<td class="text-center">
2023-11-22 11:17:37 +01:00
<b>
2024-02-16 06:19:28 +01:00
{{ intensity.average_quantity_of_skill_by_passe | floatformat:2 }}
2023-11-22 11:17:37 +01:00
</b>
</td>
2024-02-04 08:43:02 +01:00
<!-- Difficulty by skill -->
2024-02-04 08:45:45 +01:00
<td class="text-center">
2024-02-16 06:19:28 +01:00
{{ intensity.average_difficulty_by_skill_in_unit | floatformat:2 }}
2024-02-04 08:43:02 +01:00
</td>
2024-02-04 08:00:13 +01:00
<!-- Skill by time -->
<!-- <td class="text-right">
2023-11-22 16:35:22 +01:00
<b>
2024-02-16 06:19:28 +01:00
{{ intensity.average_quantity_of_skill_by_time | floatformat:2 }}
2023-11-22 16:35:22 +01:00
</b>
2024-02-04 08:00:13 +01:00
</td> -->
2023-04-25 17:06:14 +02:00
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-muted">There are no intensity corresponding to your criterias.</p>
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% block footerscript %}
<script type="text/javascript">
$(document).ready(function () {
$('#intensity_table').tablesorter({
headers: {
0: { sorter: false },
},
dateFormat: "uk",
sortList: [[1, 1], [2, 1]]
});
$('#intensity_table').DataTable({
2024-01-25 16:04:30 +01:00
scrollY: '50vh',
2023-04-25 17:06:14 +02:00
scrollCollapse: true,
paging: false,
searching: false,
ordering: false,
2023-11-13 15:05:31 +01:00
"bInfo" : false,
2023-04-25 17:06:14 +02:00
});
});
</script>
{% endblock %}