Jarvis/jarvis/people/templates/gymnasts/tabs/tab_season_informations.html

120 lines
5.1 KiB
HTML

{% load has_group %}
<div class="row justify-content-center">
<div class="col-md-12 pl-0">
<div class="card mb-4">
<div class="card-header">
<div class="row">
<div class="col-8">
<h4>Season Informations</h4>
</div>
{% if request.user|has_group:"trainer" %}
<div class="col-1 ml-auto">
<div class="text-right">
<h3 class="mb-0">
<a href="{% url 'season_information_create_for_gymnast' gymnast.id %}">
<i class="fas fa-plus text-warning"></i>
</a>
</h3>
</div>
</div>
{% endif %}
</div>
</div>
<div class="card-body">
{% if season_information_list %}
<table class="table tablesorter table-striped mb-0" data-sort="table" id="season_informations_table">
<thead>
<tr>
<th></th>
<th class="header text-center">Season</th>
<th class="header text-center"># training/w</th>
<th class="header text-center"># hours/w</th>
<th class="header text-center"># S&C/w</th>
<th class="header text-center"># S&C hours/w</th>
<th class="header text-center">category</th>
</tr>
</thead>
<tbody>
{% for season_information in season_information_list %}
<tr>
<td>
<a href="{% url 'season_information_update' season_information.id %}">
<span class="tim-icons icon-pencil text-warning"></span>
</a>
</td>
<td class="text-center"><a href="{% url 'season_information_details' season_information.id %}">{{ season_information.season }}</a></td>
<td class="text-center">{{ season_information.number_of_training_sessions_per_week }}</td>
<td class="text-center"><b>{{ season_information.number_of_hours_per_week }}</b></td>
<td class="text-center">{{ season_information.number_of_s_and_c_sessions_per_week }}</td>
<td class="text-center"><b>{{ season_information.number_of_s_and_c_hours_per_week }}</b></td>
<td class="text-center"><b>{{ season_information.category.short_label }}</b></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
There are no scores corresponding to your criterias
{% endif %}
</div>
</div>
</div>
<div class="col-md-4 pl-0">
<div class="card mb-4">
<div class="card-header">
<div class="row">
<div class="col-8">
<h4>Trainers</h4>
</div>
<div class="col-2 ml-auto">
<div class="text-right">
<h4 class="mb-0">
<a href="{% url 'gymnast_trainers_listing' gymnast.id %}">
<span class="tim-icons icon-pencil text-warning"></span>
</a>
</h4>
</div>
</div>
</div>
</div>
<div class="card-body pt-0">
{% if trainers_list %}
<table class="table table-striped table-condensed mb-0" id="trainers_table">
<tbody>
{% for trainer in trainers_list %}
<tr>
<td class="text-center">{{ trainer.first_name }} {{ trainer.last_name }}{% if trainer.is_superuser %} <span class="text-muted">(Admin)</span>{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>Nobody can see your profile.</p>
{% endif %}
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('[data-sort="table"]').tablesorter({
headers: {
0: { sorter: false },
},
dateFormat : "ddmmyyyy",
sortList: [[1, 1]]
});
$('#score_table').DataTable({
scrollY: '50vh',
scrollCollapse: true,
paging: false,
searching: false,
ordering: false,
// "bInfo" : false,
});
});
</script>