76 lines
3.4 KiB
HTML
76 lines
3.4 KiB
HTML
|
{% extends "listing.html" %}
|
||
|
|
||
|
{% block datacontent %}
|
||
|
<div class="card mb-0">
|
||
|
<div class="card-header">
|
||
|
<h4 class="card-title"> Places Listing</h4>
|
||
|
</div>
|
||
|
<div class="card-body pb-0">
|
||
|
<div class="table-responsive pb-0">
|
||
|
{% if place_list %}
|
||
|
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="maintable">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th style="width: 3%"></th>
|
||
|
<th class="header text-left" style="width: 27%">Name</th>
|
||
|
<th class="header text-left" style="width: 35%">Address</th>
|
||
|
<th class="header text-center" style="width: 5%">Zip</th>
|
||
|
<th class="header text-left" style="width: 15%">City</th>
|
||
|
<th class="header text-left" style="width: 4%">#km</th>
|
||
|
<th class="header text-left" style="width: 4%">#min</th>
|
||
|
<!-- <th class="header text-center">Active ?</th> -->
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{% for place in place_list %}
|
||
|
<tr>
|
||
|
<td>
|
||
|
<a href="{% url 'place_update' place.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-left"><a href="{% url 'place_details' place.id %}">{{ place.name }}</a></td>
|
||
|
<td class="text-left">{{ place.address }}</td>
|
||
|
<td class="text-right">{{ place.postal}}</td>
|
||
|
<td class="text-left">{{ place.city }}</td>
|
||
|
<td class="text-center">{% if place.nbkm %}{{ place.nbkm }}{% else %}0{% endif %}</td>
|
||
|
<td class="text-center">{% if place.timing %}{{ place.timing }}{% else %}0{% endif %}</td>
|
||
|
<!-- <td class="text-center">{{ place.active }}</td> -->
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
{% else %}
|
||
|
<table class="table">
|
||
|
<tr>
|
||
|
<td>There are no places corresponding to your criterias</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="card-footer text-right text-muted pt-0">
|
||
|
<a href="{% url 'place_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: [[3,0], [1,0]]
|
||
|
})
|
||
|
});
|
||
|
</script>
|
||
|
{% endblock %}
|