queue-manager/templates/admin.html

56 lines
1.6 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Panel admina — kolejka</title>
<style>body{font-family:Helvetica,Arial;margin:20px} .col{float:left;width:30%;padding:10px} .btn{display:inline-block;margin:3px;padding:6px 10px;background:#2b7;padding:color:#fff;border-radius:4px}</style>
</head>
<body>
<h2>Panel admina</h2>
<form method="post">
<label>Start — liczba numerów:
<input name="count" type="number" min="1" value="20">
</label>
<button name="action" value="start">Start</button>
<button name="action" value="reset">Reset</button>
</form>
<div style="overflow:hidden;margin-top:20px">
<div class="col">
<h3>Oczekujące</h3>
{% for n in waiting %}
<form style="display:inline" method="post">
<input type="hidden" name="num" value="{{n}}">
<button name="action" value="call">{{n}}</button>
</form>
{% else %}
<p>brak</p>
{% endfor %}
</div>
<div class="col">
<h3>Wywołane (obecne)</h3>
{% for n in called %}
<form style="display:block;margin-bottom:6px" method="post">
<span style="font-size:20px;margin-right:8px">{{n}}</span>
<input type="hidden" name="num" value="{{n}}">
<button name="action" value="done">Przyszedł / Usuń</button>
</form>
{% else %}
<p>brak</p>
{% endfor %}
</div>
<div class="col">
<h3>Obsłużone</h3>
{% for n in done %}
<div>{{n}}</div>
{% else %}
<p>brak</p>
{% endfor %}
</div>
</div>
</body>
</html>