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

90 lines
4.0 KiB
HTML

{% extends "listing.html" %}
{% load has_group %}
{% block datacontent %}
<div class="row justify-content-center">
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
<div class="card">
<div class="card-header row">
<div class="col-8">
<h4 class="">Season informations listing {% if gymnast %}for <a href="{% url 'gymnast_details' gymnast.id %}"><i>{{ gymnast }}</i></a>{% endif %}</h4>
</div>
<div class="col-1 ml-auto">
<div class="text-right">
{% if request.user|has_group:"trainer" %}
<a href="{% if gymnast %}{% url 'add_season_information_for_gymnast' gymnast.id %}{% else %}{% url 'season_information_create' %}{% endif %}">
<button type="submit" value="add" class="btn btn-icon btn-warning ">
<i class="fas fa-plus"></i>
</button>
</a>
{% endif %}
</div>
</div>
</div>
<div class="card-body">
{% if season_information_list %}
<table class="table tablesorter table-striped mb-0" data-sort="table" id="score_table">
<thead>
<tr>
<th></th>
<th class="header text-left">Gymnast</th>
<th class="header text-left">Season</th>
<th class="header text-left"># training/w</th>
<th class="header text-left"># hours/w</th>
<th class="header text-left"># S&C/w</th>
<th class="header text-left"># S&C hours/w</th>
<th class="header text-left">category</th>
<th class="header text-center">club</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><a href="{% url 'gymnast_details' season_information.gymnast.id %}">{{ season_information.gymnast }}</a></td>
<td>{{ season_information.season }}</td>
<td>{{ season_information.number_of_training_sessions_per_week }}</td>
<td>{{ season_information.number_of_hours_per_week }}</td>
<td>{{ season_information.number_of_s_and_c_sessions_per_week }}</td>
<td>{{ season_information.number_of_s_and_c_hours_per_week }}</td>
<td class="text-right">{{ season_information.get_category_display }}</td>
<td class="text-right">{{ season_information.club.name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
There are no scores corresponding to your criterias
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block footerscript %}
<script type="text/javascript">
$(document).ready(function () {
$('[data-sort="table"]').tablesorter({
headers: {
0: { sorter: false },
},
dateFormat: "uk",
sortList: [[2, 1]]
});
$('#score_table').DataTable({
scrollY: 500,
scrollCollapse: true,
paging: false,
searching: false,
ordering: false,
// "bInfo" : false,
});
});
</script>
{% endblock %}