reformat code
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{% extends "admin/change_list.html" %}
|
||||
{% load i18n admin_urls static admin_list %}
|
||||
{% block object-tools-items %}
|
||||
<li>
|
||||
<a href="{% url 'admin:process_locationdata' %}">
|
||||
LD Verarbeiten
|
||||
</a>
|
||||
</li>
|
||||
{{ block.super }}
|
||||
<li>
|
||||
<a href="{% url 'admin:process_locationdata' %}">
|
||||
LD Verarbeiten
|
||||
</a>
|
||||
</li>
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
@@ -4,9 +4,9 @@
|
||||
{% block title %}Abrechnung{% endblock %}
|
||||
|
||||
{% block breadcrumb %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'billard:location_index' %}">Standorte</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'billard:location_detail' location.id %}">{{ location.code }}</a></li>
|
||||
<li class="breadcrumb-item active">Abrechnung</li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'billard:location_index' %}">Standorte</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'billard:location_detail' location.id %}">{{ location.code }}</a></li>
|
||||
<li class="breadcrumb-item active">Abrechnung</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -23,19 +23,19 @@
|
||||
<th>Preis Happy Hour:</th>
|
||||
<th>Preis gesamt:</th>
|
||||
</tr>
|
||||
{% for acc in accounting %}
|
||||
<tr>
|
||||
<td>{{ acc.time_from }}</td>
|
||||
<td>{{ acc.time_to }}</td>
|
||||
<td>{{ acc.prize_normal }}</td>
|
||||
<td>{{ acc.prize_hh }}</td>
|
||||
<td>{{ acc.prize }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% for acc in accounting %}
|
||||
<tr>
|
||||
<td>{{ acc.time_from }}</td>
|
||||
<td>{{ acc.time_to }}</td>
|
||||
<td>{{ acc.prize_normal }}</td>
|
||||
<td>{{ acc.prize_hh }}</td>
|
||||
<td>{{ acc.prize }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<form action="confirm/" method="post" id="accounting">
|
||||
{% csrf_token %}
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="location-selector" value="{{ location_id }}">
|
||||
<input type="hidden" name="accountings" value="{{ acc_ids }}">
|
||||
<button type="submit" class="btn btn-default">Abrechnen</button>
|
||||
|
@@ -1,36 +1,37 @@
|
||||
{% if accounts %}
|
||||
<div id="accountsmodal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Abrechnung</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Tisch #</td>
|
||||
<td>Tisch Name</td>
|
||||
<td class="text-right">Normalpreis</td>
|
||||
<td class="text-right">Preis HH</td>
|
||||
<td class="text-right">Gesamt</td>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for account in accounts %}
|
||||
<tr>
|
||||
<td>{{ account.desk.desk_no }}</td>
|
||||
<td>{{ account.desk.name }}</td>
|
||||
<td class="text-right">{{ account.prize_normal }}</td>
|
||||
<td class="text-right">{{ account.prize_hh }}</td>
|
||||
<td class="text-right"><strong>{{ account.prize }}</strong></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-default btn-primary" href="{% url 'billard:account_modal_confirm' pks=pks loc_pk=loc_pk %}">Schliessen</a>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<div id="accountsmodal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Abrechnung</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Tisch #</td>
|
||||
<td>Tisch Name</td>
|
||||
<td class="text-right">Normalpreis</td>
|
||||
<td class="text-right">Preis HH</td>
|
||||
<td class="text-right">Gesamt</td>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for account in accounts %}
|
||||
<tr>
|
||||
<td>{{ account.desk.desk_no }}</td>
|
||||
<td>{{ account.desk.name }}</td>
|
||||
<td class="text-right">{{ account.prize_normal }}</td>
|
||||
<td class="text-right">{{ account.prize_hh }}</td>
|
||||
<td class="text-right"><strong>{{ account.prize }}</strong></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-default btn-primary"
|
||||
href="{% url 'billard:account_modal_confirm' pks=pks loc_pk=loc_pk %}">Schliessen</a>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
{% endif %}
|
@@ -4,24 +4,25 @@
|
||||
{% 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 %}
|
||||
{% 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' %}
|
||||
{% include 'billard/index_ajax.html' %}
|
||||
</div>
|
||||
<div id="modal-wrapper">
|
||||
</div>
|
||||
@@ -29,20 +30,20 @@
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
var interval;
|
||||
$(document).ready(function() {
|
||||
$.ajaxSetup({ cache: false });
|
||||
interval = window.setInterval(refresh_page, 1000);
|
||||
});
|
||||
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');
|
||||
function refresh_page() {
|
||||
$('#desk_data').load('#');
|
||||
$('#modal-wrapper').load('{% url 'accountmodal' %}', function () {
|
||||
if ($('#accountsmodal').length) {
|
||||
window.clearInterval(interval);
|
||||
$('#accountsmodal').modal('show');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@@ -1,10 +1,10 @@
|
||||
{% load display_client %}
|
||||
{% if clients %}
|
||||
{% for cli in clients %}
|
||||
{% for i in range %} {{ cli|display_client:i }} {% endfor %}
|
||||
{% endfor %}
|
||||
{% 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>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12 alert alert-danger">Keine Tische angelegt!</div>
|
||||
</div>
|
||||
{% endif %}
|
@@ -1,12 +1,12 @@
|
||||
{% load display_client %}
|
||||
{% if location.clients.all %}
|
||||
{% for cli in location.clients.all %}
|
||||
{% for i in "12345678" %}
|
||||
{{ cli|display_client:i }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% for cli in location.clients.all %}
|
||||
{% for i in "12345678" %}
|
||||
{{ cli|display_client:i }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="col">
|
||||
<div class="alert alert-danger">Keine Tische angelegt!</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="alert alert-danger">Keine Tische angelegt!</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@@ -3,39 +3,41 @@
|
||||
{% block title %}Standortliste{% endblock %}
|
||||
|
||||
{% block breadcrumb %}
|
||||
<li class="breadcrumb-item active">Standorte</li>
|
||||
<li class="breadcrumb-item active">Standorte</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if location_list %}
|
||||
<h2>Bitte Standort auswählen:</h2>
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Strasse</th>
|
||||
<th>Plz</th>
|
||||
<th>Ort</th>
|
||||
{% if perms.billard.change_accounting %}
|
||||
<th>Accounting</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for loc in location_list %}
|
||||
<tr>
|
||||
<td><a href="{% url 'billard:location_detail' loc.id %}" class="btn btn-outline-primary btn-sm">{{ loc.code|default_if_none:"" }}</a></td>
|
||||
<td>{{ loc.name|default_if_none:"" }}</td>
|
||||
<td>{{ loc.street|default_if_none:"" }}</td>
|
||||
<td>{{ loc.plz|default_if_none:"" }}</td>
|
||||
<td>{{ loc.city|default_if_none:"" }}</td>
|
||||
{% if perms.billard.change_accounting %}
|
||||
<td><a href="{% url 'billard:accounting_detail' loc.id %}" class="btn btn-outline-danger btn-sm">Abrechnen</a></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<p>Keine Standorte Zugeordnet.</p>
|
||||
{% endif %}
|
||||
{% if location_list %}
|
||||
<h2>Bitte Standort auswählen:</h2>
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Strasse</th>
|
||||
<th>Plz</th>
|
||||
<th>Ort</th>
|
||||
{% if perms.billard.change_accounting %}
|
||||
<th>Accounting</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for loc in location_list %}
|
||||
<tr>
|
||||
<td><a href="{% url 'billard:location_detail' loc.id %}"
|
||||
class="btn btn-outline-primary btn-sm">{{ loc.code|default_if_none:"" }}</a></td>
|
||||
<td>{{ loc.name|default_if_none:"" }}</td>
|
||||
<td>{{ loc.street|default_if_none:"" }}</td>
|
||||
<td>{{ loc.plz|default_if_none:"" }}</td>
|
||||
<td>{{ loc.city|default_if_none:"" }}</td>
|
||||
{% if perms.billard.change_accounting %}
|
||||
<td><a href="{% url 'billard:accounting_detail' loc.id %}"
|
||||
class="btn btn-outline-danger btn-sm">Abrechnen</a></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<p>Keine Standorte Zugeordnet.</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -3,13 +3,15 @@
|
||||
{% block title %}Location Data{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'billard/locationdata_detail_ajax.html' %}
|
||||
{% include 'billard/locationdata_detail_ajax.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
setInterval(function(){$( "#content" ).load( "#")},1000);
|
||||
});
|
||||
</script>
|
||||
$(document).ready(function () {
|
||||
setInterval(function () {
|
||||
$("#content").load("#")
|
||||
}, 1000);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@@ -3,13 +3,15 @@
|
||||
{% block title %}Location Data{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'billard/locationdata_list_ajax.html' %}
|
||||
{% include 'billard/locationdata_list_ajax.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
setInterval(function(){$( "#content" ).load( "#")},1000);
|
||||
});
|
||||
</script>
|
||||
$(document).ready(function () {
|
||||
setInterval(function () {
|
||||
$("#content").load("#")
|
||||
}, 1000);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@@ -10,33 +10,33 @@
|
||||
</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 %}
|
||||
{% 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 %}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user