76 lines
3.3 KiB
HTML
76 lines
3.3 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=""> Chronos listing</h4>
|
|
</div>
|
|
<div class="col-1 ml-auto">
|
|
<div class="text-right">
|
|
<a href="{% url 'chrono_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 chrono_list %}
|
|
<table class="table table-striped table-condensed tablesorter" id="chrono_table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 5%"> </th>
|
|
<th style="width: 10%" class="header">Date</th>
|
|
<th style="width: 25%" class="header text-left">Gymnast</th>
|
|
<th style="width: 25%" class="header text-left">Routine</th>
|
|
<th style="width: 15%" class="header">Type</th>
|
|
<th style="width: 10%" class="header text-center">Score</th>
|
|
<th style="width: 10%" class="header text-center">TOF</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for chrono in chrono_list %}
|
|
<tr>
|
|
<td>
|
|
<a href="{% url 'chrono_update' chrono.id %}">
|
|
<button type="button" rel="tooltip" class="btn btn-link btn-sm btn-icon">
|
|
<span class="tim-icons icon-pencil text-warning"></span>
|
|
</button>
|
|
</a>
|
|
</td>
|
|
<td>{{ chrono.date | date:"d-m-Y" }}</td>
|
|
<td class="text-left"><a href="{% url 'gymnast_details' chrono.gymnast.id %}">{{ chrono.gymnast }}</a></td>
|
|
<td class="text-left">{% if chrono.routine %}{{ chrono.routine.long_label }}{% else %}{{ chrono.get_chrono_type_display }}{% endif %}</a></td>
|
|
<td>{{ chrono.get_score_type_display }}</td>
|
|
<td class="text-center">{{ chrono.score }}</td>
|
|
<td class="text-center">{{ chrono.tof }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
There are no chronos 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 %} |