Ultron/templates/peoples/gymnasts/list.html

72 lines
3.0 KiB
HTML

{% extends "listing.html" %}
{% block datacontent %}
<div class="card mb-0">
<div class="card-header">
<div class="row">
<div class="col-2">
<h4 class="card-title"> Gymnast Listing</h4>
</div>
<div class="col-1 ml-auto">
<div class="text-right">
<a href="{% url 'gymnast_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>
<div class="card-body">
<div class="table-responsive">
{% if gymnast_list %}
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="maintable">
<thead>
<tr>
<th style="width: 3%"></th>
<th class="header text-left" style="width: 20%">Lastname</th>
<th class="header text-left" style="width: 20%">Firstname</th>
<th class="header text-left" style="width: 15%">Gender</th>
<th class="header text-left" style="width: 15%">Age</th>
<th class="header text-left" style="width: 15%">Club</th>
</tr>
</thead>
<tbody>
{% for gymnast in gymnast_list %}
<tr>
<td>
<a href="{% url 'gymnast_update' gymnast.id %}">
<span class="tim-icons icon-pencil text-warning"></span>
</a>
</td>
<td class="text-left"><a href="{% url 'gymnast_details' gymnast.id %}">{{ gymnast.last_name }}</a></td>
<td class="text-left"><a href="{% url 'gymnast_details' gymnast.id %}">{{ gymnast.first_name }}</a></td>
<td class="text-left">{{ gymnast.get_gender_display }}</td>
<td class="text-left">{{ gymnast.age }}</td>
<td class="text-left">{{ gymnast.club.acronym }} ({{ gymnast.club.place.city }})</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
There are no gymnast corresponding to your criterias.
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% block footerscript %}
<script type="text/javascript">
$(document).ready(function() {
$('[data-sort="table"]').tablesorter({
headers: {
0: { sorter: false }, // disable first column
},
dateFormat: "uk",
sortList: [[3,0], [1,0]]
})
});
</script>
{% endblock %}