cleanup code, remove unused templates

This commit is contained in:
Robert Einsle 2018-02-15 08:10:58 +01:00
parent 47e265a02c
commit 3483c823a0
6 changed files with 0 additions and 186 deletions

View File

@ -1,49 +0,0 @@
{% extends '_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>
<div id="modal-wrapper">
</div>
{% endblock %}
{% block js %}
<script type="text/javascript">
var interval;
$(document).ready(function () {
$.ajaxSetup({cache: false});
interval = window.setInterval(refresh_page, 1000);
});
function refresh_page() {
$('#desk_data').load('#');
$('#modal-wrapper').load('{% url 'accountmodal' %}', function () {
if ($('#accountsmodal').length) {
window.clearInterval(interval);
$('#accountsmodal').modal('show');
}
});
}
</script>
{% endblock %}

View File

@ -1,10 +0,0 @@
{% load display_client %}
{% if clients %}
{% for cli in clients %}
{% for i in range %} {{ cli|display_client:i }} {% endfor %}
{% endfor %}
{% else %}
<div class="col-md-12">
<div class="col-md-12 alert alert-danger">Keine Tische angelegt!</div>
</div>
{% endif %}

View File

@ -1,17 +0,0 @@
{% extends '_base.html' %}
{% block title %}Location Data{% endblock %}
{% block content %}
{% include 'billard/locationdata_detail_ajax.html' %}
{% endblock %}
{% block js %}
<script type="text/javascript">
$(document).ready(function () {
setInterval(function () {
$("#content").load("#")
}, 1000);
});
</script>
{% endblock %}

View File

@ -1,51 +0,0 @@
<h1>Locationdata: {{ locationdata.id }}</h1>
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
<form action="{% url 'index' %}" method="post" class="form-horizontal">
{% csrf_token %}
<div class="form-group">
<label for="location_id" class="col-sm-2 control-label">Location Id</label>
<div class="col-sm-10">
<input id="location_id" type="text" name="location_id" value="{{ locationdata.location_id }}"
placeholder="Locaton" class="form-control" disabled="disabled"/>
</div>
<div class="form-group">
<label for="table_no" class="col-sm-2 control-label">Table Number</label>
<div class="col-sm-10">
<input id="table_no" type="number" name="table_no" value="{{ locationdata.table_no }}"
placeholder="Table" class="form-control" min="1" max="8" disabled="disabled"/>
</div>
<div class="form-group">
<label for="tst" class="col-sm-2 control-label">Timestamp</label>
<div class="col-sm-10">
<input id="tst" type="datetime" name="tst" value="{{ locationdata.tst }}"
placeholder="Table" class="form-control" disabled="disabled"/>
</div>
</div>
<div class="form-group">
<label for="on_off" class="col-sm-2 control-label">On / Off</label>
<div class="col-sm-10">
<input id="on_off" type="checkbox" name="on_off" value="{{ locationdata.on_off }}"
placeholder="Table" class="form-control" disabled="disabled"/>
</div>
</div>
<div class="form-group">
<label for="processed" class="col-sm-2 control-label">Processed</label>
<div class="col-sm-10">
<input id="processed" type="checkbox" name="processed" value="{{ locationdata.processed }}"
placeholder="Table" class="form-control" disabled="disabled"/>
</div>
</div>
<div class="form-group">
<label for="error_msg" class="col-sm-2 control-label">Error Message</label>
<div class="col-sm-10">
<input id="error_msg" type="text" name="error_msg" value="{{ locationdata.error_msg }}"
placeholder="Table" class="form-control" disabled="disabled"/>
</div>
</div>
<button type="submit" class="btn btn-default">Abschicken</button>
<a class="btn btn-default" href=".." role="button">Zurück</a>
</form>

View File

@ -1,17 +0,0 @@
{% extends '_base.html' %}
{% block title %}Location Data{% endblock %}
{% block content %}
{% include 'billard/locationdata_list_ajax.html' %}
{% endblock %}
{% block js %}
<script type="text/javascript">
$(document).ready(function () {
setInterval(function () {
$("#content").load("#")
}, 1000);
});
</script>
{% endblock %}

View File

@ -1,42 +0,0 @@
{% extends '_base.html' %}
{% block title %}Location Data{% endblock %}
{% block content %}
<div id="location-selector" class="alert">
<select class="form-control">
<option value="1">Casino 1</option>
<option value="2">Casino 2</option>
</select>
</div>
{% if object_list %}
<h1>Location Data</h1>
<table class="table table-hover">
<tr>
<th>ID</th>
<th>Location</th>
<th>Table</th>
<th>Timestamp</th>
<th>On_Off</th>
<th>Proc</th>
<th>Error</th>
</tr>
{% for location_data in object_list %}
<tr>
<td><a href="{% url 'detail' location_data.id %}">{{ location_data.id }}</a></td>
<td>{{ location_data.location_id }}</td>
<td>{{ location_data.table_no }}</td>
<td>{{ location_data.tst }}</td>
<td>{{ location_data.on_off }}</td>
<td>{{ location_data.processed }}</td>
<td>{{ location_data.error_msg }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>No data available.</p>
{% endif %}
{% endblock %}