Ultron/templates/locations/places/list.html

78 lines
3.5 KiB
HTML

{% extends "listing.html" %}
{% block datacontent %}
<div class="card mb-0">
<div class="card-header">
<div class="row">
<div class="col-2">
<h4 class="card-title"> Places Listing</h4>
</div>
<div class="col-1 ml-auto">
<div class="text-right">
<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>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
{% 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 %}
There are no places corresponding to your criterias.
{% endif %}
</div>
</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 %}