Bisher war das Logo fest im Repository verdrahtet. Damit hat ein Update das Logo eines Kunden ueberschrieben - beim Sprung auf den modularen Stand zum Beispiel von logo.svg auf die mitgelieferte logo.png. Unter Einstellungen > Logo laesst sich jetzt ein eigenes Logo hochladen. Es erscheint in der Seitenleiste, auf der Login-Seite und auf der Zentrale-Seite, mit Vorschau auf hellem und dunklem Grund. - Datei liegt unter static/custom/ und ist per .gitignore von der Versionierung ausgenommen, ein git pull ueberschreibt sie also nicht - PNG, JPG, SVG, WEBP, GIF bis 2 MB; Format und Groesse werden geprueft - es bleibt immer genau eine Datei liegen, alte Endungen werden entfernt - fehlt die Datei, greift automatisch das mitgelieferte Logo - Upload und Zuruecksetzen liegen hinter dem Admin-Login - logo_url() ist als Jinja-Global registriert, damit auch die Seiten ohne _ctx() (Login, Zentrale) dasselbe Logo zeigen .gitignore ergaenzt: static/custom/ sowie die bisher fehlenden busylight.db-shm, busylight.db-wal und Status.csv - letztere lagen auf dem Produktivsystem als untracked herum. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
126 lines
6.6 KiB
HTML
126 lines
6.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Zentrale - Busylight</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.min.css" rel="stylesheet">
|
|
</head>
|
|
<body class="bg-light">
|
|
<div class="container">
|
|
<div class="row justify-content-center mt-4 mb-5">
|
|
<div class="col-md-5">
|
|
<div class="card shadow-sm">
|
|
<div class="card-body p-4">
|
|
<div class="text-center mb-4">
|
|
<img src="{{ logo_url() }}" alt="Logo" style="height: 40px;" class="mb-2">
|
|
<h5 class="mb-0">Zentrale besetzen</h5>
|
|
</div>
|
|
|
|
{% if message %}
|
|
<div class="alert alert-success py-2">
|
|
<small><i class="bi bi-check-circle"></i> {{ message }}</small>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if error %}
|
|
<div class="alert alert-danger py-2">
|
|
<small><i class="bi bi-exclamation-triangle"></i> {{ error }}</small>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if not target %}
|
|
<div class="alert alert-warning py-2 mb-0">
|
|
<small>
|
|
<i class="bi bi-gear"></i>
|
|
Die Zentrale ist noch nicht eingerichtet. Unter
|
|
<strong>Einstellungen > Zentrale</strong> muss ein Busylight
|
|
und ein Segment ausgewaehlt werden.
|
|
</small>
|
|
</div>
|
|
{% else %}
|
|
|
|
<div class="border rounded p-3 mb-4 bg-white">
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<div>
|
|
<small class="text-muted d-block">Busylight der Zentrale</small>
|
|
<strong>{{ target.name }}</strong>
|
|
<small class="text-muted">(Segment {{ target.segment }})</small>
|
|
</div>
|
|
</div>
|
|
<hr class="my-2">
|
|
<small class="text-muted d-block">Aktuell besetzt von</small>
|
|
{% if occupant %}
|
|
<strong class="text-success"><i class="bi bi-person-fill"></i> {{ occupant }}</strong>
|
|
{% else %}
|
|
<span class="text-muted"><i class="bi bi-person-dash"></i> niemand</span>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if user %}
|
|
<div class="text-center mb-3">
|
|
<small class="text-muted d-block">Durchwahl {{ user.phone_extension }}</small>
|
|
<strong>{{ user.display_name }}</strong>
|
|
</div>
|
|
|
|
{% if is_here %}
|
|
<div class="alert alert-info py-2">
|
|
<small><i class="bi bi-info-circle"></i> Du sitzt derzeit auf der Zentrale.</small>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<form method="post" action="/api/zentrale/uebernehmen" class="mb-2">
|
|
<input type="hidden" name="extension" value="{{ user.phone_extension }}">
|
|
<button type="submit" class="btn btn-primary w-100" {% if is_here %}disabled{% endif %}>
|
|
<i class="bi bi-box-arrow-in-right"></i> Zentrale uebernehmen
|
|
</button>
|
|
</form>
|
|
|
|
<form method="post" action="/api/zentrale/verlassen">
|
|
<input type="hidden" name="extension" value="{{ user.phone_extension }}">
|
|
<button type="submit" class="btn btn-outline-secondary w-100">
|
|
<i class="bi bi-box-arrow-left"></i> Zurueck auf mein Tuerschild
|
|
</button>
|
|
</form>
|
|
|
|
{% if home %}
|
|
<div class="text-center mt-3">
|
|
<small class="text-muted">
|
|
Gemerktes Tuerschild: {{ home.name or home.hostname }} (Segment {{ home.segment }})
|
|
</small>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="text-center mt-3">
|
|
<a href="/zentrale" class="text-muted small">Andere Durchwahl</a>
|
|
</div>
|
|
{% else %}
|
|
<form method="post" action="/api/zentrale/uebernehmen">
|
|
<div class="mb-3">
|
|
<label class="form-label">Eigene Telefon-Durchwahl</label>
|
|
<input type="text" name="extension" class="form-control form-control-lg text-center"
|
|
inputmode="numeric" autocomplete="off" autofocus required
|
|
value="{{ extension }}" placeholder="z.B. 123">
|
|
<small class="text-muted">
|
|
Damit wird die eigene Person auf das Busylight der Zentrale gesetzt.
|
|
</small>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary w-100">
|
|
<i class="bi bi-box-arrow-in-right"></i> Zentrale uebernehmen
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<div class="text-center mt-4">
|
|
<small class="text-secondary" style="font-size:0.65rem">© cynfo GmbH</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|