75 lines
3.0 KiB
HTML
75 lines
3.0 KiB
HTML
{% extends "listing.html" %}
|
|
|
|
<!-- {% block page_title %}.: Accident's list :.{% endblock %}
|
|
{% block searchurl %}accident{% endblock %}
|
|
{% block title %}Accidents{% endblock %}
|
|
{% block addurl %}accident{% endblock %}
|
|
{% block modurl %}accident{% endblock %}
|
|
{% block search %}accident{% endblock %} -->
|
|
|
|
{% block datacontent %}
|
|
<div class="card mb-0">
|
|
<div class="card-header">
|
|
<h4 class="card-title"> Accidents' Listing</h4>
|
|
</div>
|
|
<div class="card-body pb-0">
|
|
<div class="table-responsive pb-0">
|
|
{% if accident_list.count >= 1 %}
|
|
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="maintable">
|
|
<thead class="text-primary">
|
|
<tr>
|
|
<th style="width: 3%"></th>
|
|
<th style="width: 10%">Date</th>
|
|
<th style="width: 45%">Gymnast</th>
|
|
<th style="width: 42%">Skill</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for accident in accident_list %}
|
|
<tr>
|
|
<td>
|
|
<a href="{% url 'accident_update' accident.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 class="text-right"><a href="{% url 'accident_details' accident.id %}">{{ accident.date | date:"d-m-Y" }}</a></td>
|
|
<td class="text-left"><a href="{% url 'gymnast_details' accident.gymnast.id %}">{{ accident.gymnast }}</a></td>
|
|
<td class="text-left"><a href="{% url 'skill_details' accident.educative.id %}">{{ accident.educative.notation }} ({{ accident.educative.shortLabel }})</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<table class="table">
|
|
<tr>
|
|
<td>There no accident corresponding to your criterias…</td>
|
|
</tr>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="card-footer text-right text-muted pt-0">
|
|
<a href="{% url 'accident_create' %}">
|
|
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
|
<i class="tim-icons icon-simple-add"></i>
|
|
</button>
|
|
</a>
|
|
</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: [[1,1]]
|
|
})
|
|
});
|
|
</script>
|
|
{% endblock %} |