119 lines
6.0 KiB
HTML
119 lines
6.0 KiB
HTML
|
|
<div class="row justify-content-center ml-3 pr-0">
|
|
<div class="col-md-12 pr-0">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4>Routines</h4>
|
|
</div>
|
|
<div class="card-body pt-0 pb-0">
|
|
{% if ghr_list %}
|
|
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="maintable">
|
|
<thead>
|
|
<tr>
|
|
<!-- <th></th> -->
|
|
<th style="width: 5%" class="header text-center">Type</th>
|
|
<th style="width: 30%" class="header text-left">Label</th>
|
|
<th style="width: 10%" class="header text-center">From</th>
|
|
<th style="width: 10%" class="header text-center">To</th>
|
|
<th style="width: 5%" class="header text-center">Diff.</th>
|
|
<th style="width: 5%" class="header text-center">Level</th>
|
|
<th style="width: 5%" class="header text-center">Rank</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for ghr in ghr_list %}
|
|
<tr>
|
|
<!-- <td> -->
|
|
<!-- <a href="{% url 'routine_update' ghr.routine.id %}"> -->
|
|
<!-- <span class="tim-icons icon-pencil text-warning"></span> -->
|
|
<!-- </a> -->
|
|
<!-- </td> -->
|
|
<td class="text-center">{{ ghr.get_routine_type_display }}</td>
|
|
<td class="text-left"><a href="{% url 'routine_details' ghr.routine.id %}">{{ ghr.routine.long_label }}</a></td>
|
|
<td class="text-center">{{ ghr.datebegin | date:"d-m-Y"}}</td>
|
|
<td class="text-center">{% if ghr.dateend %}{{ ghr.dateend | date:"d F Y" }}{% else %}… to now.{% endif %}</td>
|
|
<td class="text-center">{{ ghr.routine.difficulty }}</td>
|
|
<td class="text-center">{{ ghr.routine.level }}</td>
|
|
<td class="text-center">{{ ghr.routine.rank }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% else %}
|
|
<p class="text-muted">There are no routines associated to this gymnast.</p>
|
|
{% endif %}
|
|
</div>
|
|
<div class="card-footer text-right text-muted pt-0">
|
|
<a href="{% url 'link_routine_to_gymnast' gymnast_id %}">
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
<i class="tim-icons icon-simple-add"></i>
|
|
</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-12 pr-0">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4>Routine's statistics</h4>
|
|
</div>
|
|
<div class="card-body pt-0 pb-0">
|
|
{% if routine_done_list %}
|
|
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="maintable">
|
|
<thead>
|
|
<tr>
|
|
<!-- <th></th> -->
|
|
<th style="width: 30%" class="header text-center">Routine</th>
|
|
<th style="width: 10%" class="header text-left">Type</th>
|
|
<th style="width: 15%" class="header text-center">Date</th>
|
|
<th style="width: 10%" class="header text-center"># Try</th>
|
|
<th style="width: 10%" class="header text-center"># Success</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for record in routine_done_list %}
|
|
<tr>
|
|
<!-- <td> -->
|
|
<!-- <a href="{% url 'routine_update' record.routine.id %}"> -->
|
|
<!-- <span class="tim-icons icon-pencil text-warning"></span> -->
|
|
<!-- </a> -->
|
|
<!-- </td> -->
|
|
<td class="text-left"><a href="{% url 'routine_details' record.routine.id %}">{{ record.routine.long_label }}</a></td>
|
|
<td class="text-center">{{ record.get_routine_type_display }}</td>
|
|
<td class="text-center">{{ record.date | date:"d-m-Y"}}</td>
|
|
<td class="text-center">{{ record.number_of_try }}</td>
|
|
<td class="text-center">{{ record.number_of_successes }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% else %}
|
|
<p class="text-muted">There are no routine's statistics associated to this gymnast.</p>
|
|
{% endif %}
|
|
</div>
|
|
<div class="card-footer text-right text-muted pt-0">
|
|
<a href="{% url 'link_routine_to_gymnast' gymnast_id %}">
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
<i class="tim-icons icon-simple-add"></i>
|
|
</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$('[data-sort="table"]').tablesorter({
|
|
headers: {
|
|
0: { sorter: false }, // disable first column
|
|
},
|
|
dateFormat: "uk",
|
|
sortList: [[2,1], ]
|
|
})
|
|
});
|
|
</script>
|