2023-04-25 17:06:14 +02:00
|
|
|
{% extends "listing.html" %}
|
|
|
|
{% load has_group %}
|
|
|
|
|
|
|
|
{% block datacontent %}
|
|
|
|
<div class="card mb-0">
|
|
|
|
<div class="card-header">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-8">
|
2023-05-01 17:07:50 +02:00
|
|
|
<h4 class=""> {{ title }} Listing {% if gymnast_id %}for <i>{{ gymnast }}</i>{% endif %}</h4>
|
2023-04-25 17:06:14 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-1 ml-auto">
|
|
|
|
<div class="text-right">
|
|
|
|
{% if request.user|has_group:"trainer" %}
|
2023-05-01 17:07:50 +02:00
|
|
|
<a href="{% url 'combination_create' %}">
|
2023-04-25 17:06:14 +02:00
|
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning mb-0">
|
|
|
|
<i class="fas fa-plus"></i>
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="table-responsive">
|
|
|
|
{% if routine_list %}
|
|
|
|
<table class="table tablesorter table-striped" data-sort="table" id="routine_table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
{% if request.user|has_group:"trainer" %}
|
|
|
|
<th style="width: 3%"></th>
|
|
|
|
{% endif %}
|
|
|
|
<th class="header text-left" style="width: 35%"> Long Label</th>
|
|
|
|
<th class="header text-left" style="width: 20%"> Short Label</th>
|
|
|
|
<th class="text-center" style="width: 10%">Competitive ?</th>
|
|
|
|
<th class="header text-center"><i class="far fa-venus"></i></th>
|
|
|
|
<th class="header text-center"><i class="far fa-mars"></i></th>
|
|
|
|
<th class="header text-center" style="width: 7%">Diff.</th>
|
|
|
|
<th class="header text-center" style="width: 7%">Level</th>
|
|
|
|
<th class="header text-center" style="width: 7%">Rank</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for routine in routine_list %}
|
|
|
|
<tr role="row" class="{% cycle 'odd' 'even' %}">
|
|
|
|
{% if request.user|has_group:"trainer" %}
|
|
|
|
<td>
|
2023-05-01 17:07:50 +02:00
|
|
|
<a href="{% url 'combination_update' routine.id %}">
|
2023-04-25 17:06:14 +02:00
|
|
|
<span class="tim-icons icon-pencil text-warning"></span>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
2023-05-01 17:07:50 +02:00
|
|
|
<td class="text-left"><a href="{% url 'combination_details' routine.id %}">{{ routine.long_label }}</a></td>
|
|
|
|
<td class="text-left"><a href="{% url 'combination_details' routine.id %}">{{ routine.short_label }}</a></td>
|
2023-04-25 17:06:14 +02:00
|
|
|
<td class="text-center">
|
|
|
|
{% if routine.is_competitive %}<i class="fa fa-check text-success" aria-hidden="true"></i>
|
|
|
|
{% else %}<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td class="text-center">{{ routine.age_girl_masterised }}</td>
|
|
|
|
<td class="text-center">{{ routine.age_boy_masterised }}</td>
|
|
|
|
<td class="text-center">{{ routine.difficulty }}</td>
|
|
|
|
<td class="text-center">{{ routine.level }}</td>
|
|
|
|
<td class="text-center">{{ routine.rank }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% else %}
|
2023-05-08 10:12:15 +02:00
|
|
|
<p class="muted-text">There are no {{ title|lower }} corresponding to your criterias.</p>
|
2023-04-25 17:06:14 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block footerscript %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function () {
|
|
|
|
$('routine_table').tablesorter({
|
|
|
|
{% if request.user|has_group:"trainer" %}
|
|
|
|
headers: {
|
|
|
|
0: { sorter: false },
|
|
|
|
},
|
|
|
|
sortList: [[1, 0]],
|
|
|
|
{% else %}
|
|
|
|
sortList: [[0, 0]],
|
|
|
|
{% endif %}
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#routine_table').DataTable({
|
|
|
|
scrollY: 500,
|
|
|
|
scrollCollapse: true,
|
|
|
|
paging: false,
|
|
|
|
searching: false,
|
|
|
|
ordering: false,
|
|
|
|
"bInfo": false,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|