Ultron/templates/followup/routinedone/list.html

70 lines
3.1 KiB
HTML
Raw Normal View History

{% extends "listing.html" %}
{% 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">
<h4 class="">Routine done list</h4>
</div>
<div class="card-body">
{% if routine_done_list %}
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="maintable">
<thead>
<tr>
<th style="width: 5%"></th>
<th style="width: 15%" class="header text-center">Date</th>
<th style="width: 15%" class="header text-left">Type</th>
<th style="width: 30%" class="header text-center">Routine</th>
<th style="width: 15%" class="header text-center"># Try</th>
<th style="width: 15%" class="header text-center"># Success</th>
</tr>
</thead>
<tbody>
{% for routine_done in routine_done_list %}
<tr>
<td>
<a href="{% url 'routinedone_update' routine_done.id %}">
<span class="tim-icons icon-pencil text-warning"></span>
</a>
</td>
<td class="text-center">{{ routine_done.date | date:"d-m-Y"}}</td>
<td class="text-center">{{ routine_done.get_routine_type_display }}</td>
<td class="text-left"><a href="{% url 'routine_details' routine_done.routine.id %}">{{ routine_done.routine.long_label }}</a></td>
<td class="text-center">{{ routine_done.number_of_try }}</td>
<td class="text-center">{{ routine_done.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 'routinedone_create' %}">
<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>
{% endblock %}
{% block footerscript %}
<script type="text/javascript">
$(document).ready(function() {
$('[data-sort="table"]').tablesorter({
headers: {
0: { sorter: false },
},
dateFormat: "uk",
sortList: [[1,1]]
})
});
</script>
{% endblock %}