35 lines
974 B
HTML
35 lines
974 B
HTML
{% extends 'billard/base.html' %}
|
|
{% load display_client %}
|
|
|
|
{% block title %}Location Data{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if not locations|length_is:"1" %}
|
|
<form action="." method="post" id="location-form">
|
|
{% csrf_token %}
|
|
<div id="location-selector" class="alert">
|
|
<select class="form-control" form="location-form" name="location-selector" id="location-select">
|
|
{% for loc in locations %}
|
|
<option value="{{ loc.id }}"{% if loc.id == location_id %} selected{% endif %}>{{ loc.code }} - {{ loc.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</form>
|
|
{% endif %}
|
|
<div id="desk_data">
|
|
{% include 'billard/index_ajax.html' %}
|
|
</div>
|
|
{% endblock %}
|
|
{% block js %}
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$.ajaxSetup({ cache: false });
|
|
window.setInterval(refresh_page, 1000);
|
|
});
|
|
|
|
function refresh_page() {
|
|
$('#desk_data').load('#')
|
|
}
|
|
</script>
|
|
{% endblock %}
|