131 lines
6.7 KiB
HTML
131 lines
6.7 KiB
HTML
{% extends "listing.html" %}
|
|
|
|
{% block datacontent %}
|
|
<div class="card mb-0">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-8">
|
|
<h4 class=""> Intensity listing {% if gymnast %}for <i><a href="{% url 'gymnast_details_tab' gymnast.id 'routine' %}">{{ gymnast }}</a></i>{% endif %}</h4>
|
|
</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>
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
{% if intensity_list %}
|
|
<table class="table table-striped tablesorter" id="intensity_table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 3%"> </th>
|
|
<th style="width: 8%" class="header">Date</th>
|
|
<th style="width: 18%" class="header text-left">Gymnast</th>
|
|
|
|
<th style="width: 7%" class="header text-center"># passes</th>
|
|
<th style="width: 6%" class="header text-center">Time</th>
|
|
<th style="width: 6%" class="header text-center"># Skill</th>
|
|
<th style="width: 6%" class="header text-center">Diff</th>
|
|
|
|
<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 -->
|
|
<th style="width: 7%" class="header text-center">S/T</th><!-- Skill by time -->
|
|
</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>
|
|
<td><a href="{% url 'intensity_details' intensity.id %}">{{ intensity.date | date:"d-m-Y" }}</a></td>
|
|
<td class="text-left">
|
|
<a href="{% url 'gymnast_details_tab' intensity.gymnast.id 'routine' %}">
|
|
{{ intensity.gymnast }}
|
|
</a>
|
|
</td>
|
|
|
|
<td class="text-right">{{ intensity.number_of_passes }}</td>
|
|
<td class="text-right">{{ intensity.time }}</td>
|
|
<td class="text-right">{{ intensity.quantity_of_skill }}</td>
|
|
<td class="text-right">{{ intensity.difficulty_in_unit }}</td>
|
|
|
|
<td class="text-right"><!-- Time by passe -->
|
|
<b>
|
|
{% if intensity.mean_time_by_passe > 4.13 %}
|
|
<span class="text-danger">{{ intensity.mean_time_by_passe | floatformat:2 }}</span>
|
|
{% elif intensity.mean_time_by_passe > 3.80 %}
|
|
<span class="text-warning">{{ intensity.mean_time_by_passe | floatformat:2 }}</span>
|
|
{% else %}
|
|
<span class="text-success">{{ intensity.mean_time_by_passe | floatformat:2 }}</span>
|
|
{% endif %}
|
|
</b>
|
|
</td>
|
|
<td class="text-right">{{ intensity.mean_difficulty_by_passe_in_unit | floatformat:2 }}</td><!-- Difficulty by passe -->
|
|
<td class="text-right"><!-- # skill by passe -->
|
|
<b>
|
|
{% if intensity.quantity_of_skill_by_passe > 7.37 %}
|
|
<span class="text-danger">{{ intensity.quantity_of_skill_by_passe | floatformat:2 }}</span>
|
|
{% elif intensity.mean_quantity_of_skill_by_time > 6.95 %}
|
|
<span class="text-warning">{{ intensity.quantity_of_skill_by_passe | floatformat:2 }}</span>
|
|
{% else %}
|
|
<span class="text-success">{{ intensity.quantity_of_skill_by_passe | floatformat:2 }}</span>
|
|
{% endif %}
|
|
</b>
|
|
</td>
|
|
<td class="text-right">{{ intensity.mean_difficulty_by_skill_in_unit | floatformat:2 }}</td><!-- Difficulty by skill -->
|
|
<td class="text-right"><!-- Skill by time -->
|
|
<b>
|
|
{% if intensity.mean_quantity_of_skill_by_time > 2.37 %}
|
|
<span class="text-danger">{{ intensity.mean_quantity_of_skill_by_time | floatformat:2 }}</span>
|
|
{% elif intensity.mean_quantity_of_skill_by_time > 2.05 %}
|
|
<span class="text-warning">{{ intensity.mean_quantity_of_skill_by_time | floatformat:2 }}</span>
|
|
{% else %}
|
|
<span class="text-success">{{ intensity.mean_quantity_of_skill_by_time | floatformat:2 }}</span>
|
|
{% endif %}
|
|
</b>
|
|
</td>
|
|
</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({
|
|
scrollY: 475,
|
|
scrollCollapse: true,
|
|
paging: false,
|
|
searching: false,
|
|
ordering: false,
|
|
"bInfo" : false,
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %} |