65 lines
2.5 KiB
HTML
65 lines
2.5 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="card-title">Mind State list</h4>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
{% if mindstate_list.count >= 1 %}
|
||
|
<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">Score</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{% for state in mindstate_list %}
|
||
|
<tr>
|
||
|
<td>
|
||
|
<a href="{% url 'mindstate_update' state.id %}">
|
||
|
<span class="tim-icons icon-pencil text-warning"></span>
|
||
|
</a>
|
||
|
</td>
|
||
|
<td class="text-left">{{ state.date | date:"d-m-Y" }}</td>
|
||
|
<td class="text-left"><a href="{% url 'gymnast_details' state.gymnast.id %}">{{ state.gymnast }}</a></td>
|
||
|
<td>{{ state.score }}</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
{% else %}
|
||
|
There are no scores corresponding to your criterias
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
<div class="card-footer text-right text-muted pt-0">
|
||
|
<a href="{% url 'mindstate_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,0]]
|
||
|
})
|
||
|
});
|
||
|
</script>
|
||
|
{% endblock %}
|