58 lines
2.5 KiB
HTML
58 lines
2.5 KiB
HTML
<div class="row justify-content-center ml-3 pr-0">
|
|
<div class="col-md-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4>Injuries</h4>
|
|
</div>
|
|
<div class="card-body pt-0 pb-0">
|
|
{% if injuries_list %}
|
|
<div class="card-body pl-0 pt-0 pr-0">
|
|
<table class="table table-striped table-condensed tablesorter mb-1">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 3%"></th>
|
|
<th class="header text-center" style="width: 10%">Date</th>
|
|
<th class="header text-left" style="width: 87%">Skill</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for injury in injuries_list %}
|
|
<tr>
|
|
<td class="text-left">
|
|
<a href="{% url 'injury_update' injury.id %}">
|
|
<span class="tim-icons icon-pencil text-warning"></span>
|
|
</a>
|
|
</td>
|
|
<td class="text-center"><a href="{% url 'injury_details' injury.id %}">{{ injury.date | date:"d-m-Y" }}</a></td>
|
|
<td class="text-left"><a href="{% url 'skill_details' injury.skill.id %}">{{ injury.skill }}</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<p class="pl-3 text-muted">No injury known for this gymnast.</p>
|
|
{% endif %}
|
|
</div>
|
|
<div class="card-footer text-right text-muted pt-0">
|
|
<a href="{% url 'injury_create_for_gymnast' gymnastid %}">
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
<i class="fas fa-plus"></i>
|
|
</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
$('[data-sort="table"]').tablesorter({
|
|
headers: {
|
|
0: { sorter: false },
|
|
},
|
|
// dateFormat: "uk",
|
|
sortList: [[1, 0]]
|
|
})
|
|
});
|
|
</script> |