2023-04-25 17:06:14 +02:00
{% 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" >
2024-02-04 19:03:33 +01:00
< h4 class = "" >
2024-02-11 12:18:11 +01:00
{% if gymnast %}< i > {% if gymnast.id in request.session.available_gymnast or request.user.is_superuser %}< a href = "{% url 'gymnast_details' gymnast.id %}" > {% endif %}< i > {{ gymnast }}< / i > < / a > 's{% endif %} Season informations listing
2024-02-04 19:03:33 +01:00
< / 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" %}
< 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 >
2024-02-11 12:18:11 +01:00
< td > {% if season_information.gymnast.id in request.session.available_gymnast or request.user.is_superuser %}< a href = "{% url 'gymnast_details' season_information.gymnast.id %}" > {% endif %}{{ season_information.gymnast }}< / a > < / td >
2023-04-25 17:06:14 +02:00
< 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({
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,
// "bInfo" : false,
});
});
< / script >
{% endblock %}