99 lines
4.1 KiB
HTML
99 lines
4.1 KiB
HTML
{% extends "listing.html" %}
|
|
|
|
{% block datacontent %}
|
|
<div class="card mb-0">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-8">
|
|
<h4 class=""> Chronos listing {% if gymnast %}for <i><a href="{% url 'gymnast_details_tab' gymnast.id 'scores' %}">{{ gymnast }}</a></i>{% endif %}
|
|
</h4>
|
|
</div>
|
|
<div class="col-1 ml-auto">
|
|
<div class="text-right">
|
|
<a
|
|
href="{% if gymnast %}{% url 'chrono_create_for_gymnast' gymnast.id %}{% else %}{% url 'chrono_create' %}{% endif %}">
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
<i class="fas fa-plus"></i>
|
|
</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
{% if chrono_list %}
|
|
<table class="table table-striped 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 role="row" class="{% cycle 'odd' 'even' %}">
|
|
<td>
|
|
<a href="{% url 'chrono_update' chrono.id %}">
|
|
<span class="tim-icons icon-pencil text-warning"></span>
|
|
</a>
|
|
|
|
<a href="{% url 'jump_chrono_values_create_or_update' chrono.id %}">
|
|
<span class="far fa-search-plus text-warning"></span>
|
|
</a>
|
|
</td>
|
|
<td>{% if chrono.details.all %}<a href="{% url 'jump_chrono_details' chrono.id %}">{% endif %}{{ chrono.date | date:"d-m-Y" }}{% if chrono.details.all %}</a>{% endif %}</td>
|
|
<td class="text-left">
|
|
<a href="{% url 'gymnast_details_tab' chrono.gymnast.id 'scores' %}">
|
|
{{ chrono.gymnast }}
|
|
</a>
|
|
</td>
|
|
<td class="text-left">
|
|
{% if chrono.routine %}
|
|
{{ chrono.routine.long_label }}
|
|
{% else %}
|
|
{{ chrono.get_chrono_type_display }}
|
|
{% endif %}
|
|
</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 %}
|
|
<p class="text-muted">There are no chronos corresponding to your criterias.</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block footerscript %}
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
$('#chrono_table').tablesorter({
|
|
headers: {
|
|
0: { sorter: false },
|
|
},
|
|
dateFormat: "uk",
|
|
sortList: [[1, 1], [2, 1]]
|
|
});
|
|
|
|
$('#chrono_table').DataTable({
|
|
scrollY: 475,
|
|
scrollCollapse: true,
|
|
paging: false,
|
|
searching: false,
|
|
ordering: false,
|
|
// "bInfo" : false,
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %} |