Ultron/templates/followup/chronos/list.html

91 lines
3.9 KiB
HTML
Raw Normal View History

{% 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>{{ gymnast }}</i>{% endif %}</h4>
2021-11-13 07:55:26 +01:00
</div>
<div class="col-1 ml-auto">
2021-11-30 18:46:17 +01:00
<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>
2021-11-13 07:55:26 +01:00
</div>
</div>
</div>
2021-11-19 13:11:25 +01:00
<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%">&nbsp;</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 %}
2022-02-06 19:28:17 +01:00
<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>
2022-02-06 19:28:17 +01:00
</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' 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 %}
<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({
2022-02-10 21:49:39 +01:00
scrollY: 475,
scrollCollapse: true,
paging: false,
searching: false,
ordering: false,
// "bInfo" : false,
});
});
</script>
{% endblock %}