Ultron/templates/followup/heightweight/list.html

69 lines
2.8 KiB
HTML

{% 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="">Height/Weight list {% if gymnast %}for <i>{{ gymnast }}</i>{% endif %}</h4>
</div>
<div class="card-body">
{% if heightweight_list %}
<table class="table tablesorter table-striped table-condensed mb-0" data-sort="table" id="maintable">
<thead>
<tr>
<th></th>
<th class="header text-left">Date</th>
<th class="header text-left">Gymnast</th>
<th class="header text-left">Height</th>
<th class="header text-left">Hips height</th>
<th class="header text-left">Weight</th>
</tr>
</thead>
<tbody>
{% for heightweight in heightweight_list %}
<tr>
<td>
<a href="{% url 'heightweight_update' heightweight.id %}">
<span class="tim-icons icon-pencil text-warning"></span>
</a>
</td>
<td class="text-left">{{ heightweight.date | date:"d-m-Y" }}</td>
<td class="text-left"><a href="{% url 'gymnast_details' heightweight.gymnast.id %}">{{ heightweight.gymnast }}</a></td>
<td>{{ heightweight.height }}</td>
<td>{{ heightweight.hips_height }}</td>
<td>{{ heightweight.weight }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-muted">There are no scores corresponding to your criterias</p>
{% endif %}
</div>
<div class="card-footer text-right text-muted pt-0">
<a href="{% url 'heightweight_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 %}