128 lines
5.2 KiB
HTML
128 lines
5.2 KiB
HTML
|
{% extends "base.html" %}
|
||
|
|
||
|
{% block page_title %}.: Club's statistics :.{% endblock %}
|
||
|
|
||
|
{% block title %}Club{% endblock %}
|
||
|
|
||
|
{% block content %}
|
||
|
|
||
|
<hr class="m-t">
|
||
|
|
||
|
{% if courses %}
|
||
|
<div class="row">
|
||
|
<div class="col-md-12">
|
||
|
<h4>Courses</h4>
|
||
|
<table class="table table-condensed" data-sort="table" id="courseTable">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Day</th>
|
||
|
<th class="centered">Hour</th>
|
||
|
<th class="centered"># Trainers</th>
|
||
|
<th class="centered"># Gymnasts</th>
|
||
|
<th class="centered">Duration</th>
|
||
|
<th class="centered"># Courses</th>
|
||
|
<th class="centered"># Hours</th>
|
||
|
<th class="centered"># Hours paid</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
{% for course in courses %}
|
||
|
<tr>
|
||
|
<td><a href="/course/{{ course.0.id }}">{{ course.0.get_iso_day_number_display }}</a></td>
|
||
|
<td class="centered">{{ course.0.hour_begin }} - {{ course.0.hour_end }}</td>
|
||
|
<td class="centered">{{ course.1 }}</td>
|
||
|
<td class="centered">{{ course.2 }}</td>
|
||
|
<td class="centered">{{ course.3 }}</td>
|
||
|
<td class="centered">{{ course.4 }}</td>
|
||
|
<td class="push-right">{{ course.5 }}</td>
|
||
|
<td class="push-right">{{ course.6 }}</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
<tfoot>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="centered">{{ totalHoursByWeek }}</td>
|
||
|
<td class="centered">{{ totalCourses }}</td>
|
||
|
<td class="push-right">{{ totalHours }}</td>
|
||
|
<td class="push-right">{{ totalHoursPaid }}</td>
|
||
|
</tr>
|
||
|
</tfoot>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
<h4>Jumpers</h4>
|
||
|
<table class="table table-condensed" data-sort="table" id="gymnastTable">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Gymnast</th>
|
||
|
<th class="centered">Courses</th>
|
||
|
<th class="centered">H./w.</th>
|
||
|
<th class="centered">Training</th>
|
||
|
<th class="centered">Presences</th>
|
||
|
<th class="centered">Absences</th>
|
||
|
<th class="push-right">H. Training</th>
|
||
|
<th class="push-right">H. Presences</th>
|
||
|
<th class="push-right">H. Absences</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
{% for gymnast in gymnasts.items %}
|
||
|
<tr>
|
||
|
<td><a href="/gymnast/{{ gymnast.0.id }}">{{ gymnast.1.gymnast }}</a></td>
|
||
|
<td class="centered">{{ gymnast.1.nbcoursebyweek }}</td>
|
||
|
<td class="centered">{{ gymnast.1.nbhourbyweek }}</td>
|
||
|
<td class="centered">{{ gymnast.1.nbtraining }}</td>
|
||
|
<td class="centered">{{ gymnast.1.nbattendance }}</td>
|
||
|
<td class="centered">{{ gymnast.1.nbabsence }}</td>
|
||
|
<td class="push-right">{{ gymnast.1.nbhourtraining }}</td>
|
||
|
<td class="push-right"><span class="btn-{% if gymnast.1.percentageattendance >= 90 %}primary{% elif gymnast.1.percentageattendance >= 80 %}success{% elif gymnast.1.percentageattendance >= 70 %}warning{% else %}danger{% endif %}-outline">{{ gymnast.1.percentageattendance }}% ({{ gymnast.1.nbhourattendance }})</span></td>
|
||
|
<td class="push-right"><span class="btn-{% if gymnast.1.percentageabsence <= 10 %}primary{% elif gymnast.1.percentageabsence <= 20 %}success{% elif gymnast.1.percentageabsence <= 30 %}warning{% else %}danger{% endif %}-outline">{{ gymnast.1.percentageabsence }}% ({{ gymnast.1.nbhourabsence }})</span></td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
{% endif %}
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-md-12 m-b-md text-md-right">
|
||
|
<form name="form" method="GET" action="/club/" class="form-inline pos-r w-full">
|
||
|
<select name="clubid" class="custom-select custom-select-sm">
|
||
|
{% for club in clubList %}
|
||
|
<option value="{{ club.id }}" {% if club.id == selectedClubid %} selected {% endif %}>{{ club.name }}</option>
|
||
|
{% endfor %}
|
||
|
</select>
|
||
|
<select name="year" class="custom-select custom-select-sm">
|
||
|
{% for year in yearsList %}
|
||
|
<option value="{{ year }}" {% if year == selectedYear %} selected {% endif %}>{{ year }}</option>
|
||
|
{% endfor %}
|
||
|
</select>
|
||
|
<input type="submit" value="Afficher" class="btn btn-sm btn-primary-outline" />
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block footerscript %}
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() {
|
||
|
$('#courseTable').tablesorter({
|
||
|
headers: {
|
||
|
1: { sorter: false }, // disable column
|
||
|
},
|
||
|
})
|
||
|
|
||
|
$('#gymnastTable').tablesorter({
|
||
|
headers: {
|
||
|
2: { sorter: false },
|
||
|
},
|
||
|
|
||
|
sortList: [[0,0]]
|
||
|
})
|
||
|
});
|
||
|
</script>
|
||
|
{% endblock %}
|