Geoffrey-Django/templates/GeoffreyApp/location_table.html

30 lines
752 B
HTML

<h2>Locations</h2>
<table id="loc_table" class="table table-hover link-table">
<thead class="bg-dark">
<tr>
<th>Location Name</th>
<th>Coordinates</th>
{% if show_owner %}
<th>Owner</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for loc in loc_list %}
<tr>
<td>{% include "GeoffreyApp/location_link.html" with loc=loc %}</td>
<td>{{ loc.location }}</td>
{% if show_owner %}
<td>{% include "GeoffreyApp/player_link.html" with player=loc.owner %}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
<script>
$(document).ready(function () {
$('#loc_table').DataTable();
});
</script>