weitere Bearibeitung
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<h1>Plattform-Dashboard</h1>
|
||||
<p>Ueberblick ueber Mandanten, Paketstand und direkte Einstiege in die Kundenumgebungen.</p>
|
||||
</div>
|
||||
<form method="post" action="/admin/logout">
|
||||
<form method="post" action="<?= e(url('/admin/logout')) ?>">
|
||||
<?= csrf_field($csrf) ?>
|
||||
<button class="button button-secondary" type="submit">Abmelden</button>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$resetRequestUrl = '/password/forgot?scope=platform';
|
||||
$resetRequestUrl = url('/password/forgot?scope=platform');
|
||||
require __DIR__ . '/../partials/layout-top.php';
|
||||
?>
|
||||
|
||||
@@ -10,7 +10,7 @@ require __DIR__ . '/../partials/layout-top.php';
|
||||
</section>
|
||||
|
||||
<div class="two-column">
|
||||
<form class="card form-card" method="post" action="/admin/login">
|
||||
<form class="card form-card" method="post" action="<?= e(url('/admin/login')) ?>">
|
||||
<?= csrf_field($csrf) ?>
|
||||
<label>
|
||||
<span>E-Mail</span>
|
||||
|
||||
@@ -31,9 +31,9 @@ $token = trim((string) ($token ?? old('token')));
|
||||
$resetToken = isset($resetToken) && is_array($resetToken) ? $resetToken : null;
|
||||
$hasValidResetToken = $resetToken !== null;
|
||||
$loginUrl = $scope === 'tenant'
|
||||
? ($tenantSlug !== '' ? tenant_url($tenantSlug, 'login') : '/')
|
||||
: '/admin/login';
|
||||
$requestUrl = '/password/forgot?scope=' . rawurlencode($scope);
|
||||
? ($tenantSlug !== '' ? tenant_url($tenantSlug, 'login') : url('/'))
|
||||
: url('/admin/login');
|
||||
$requestUrl = url('/password/forgot?scope=' . rawurlencode($scope));
|
||||
|
||||
if ($scope === 'tenant' && $tenantSlug !== '') {
|
||||
$requestUrl .= '&tenantSlug=' . rawurlencode($tenantSlug);
|
||||
@@ -63,7 +63,7 @@ require __DIR__ . '/../partials/layout-top.php';
|
||||
|
||||
<div class="two-column">
|
||||
<?php if ($hasValidResetToken): ?>
|
||||
<form class="card form-card" method="post" action="<?= e(current_path()) ?>">
|
||||
<form class="card form-card" method="post" action="<?= e(url(current_path())) ?>">
|
||||
<?= csrf_field($csrf) ?>
|
||||
<input type="hidden" name="scope" value="<?= e($scope) ?>">
|
||||
<?php if ($tenantSlug !== ''): ?>
|
||||
|
||||
@@ -28,8 +28,8 @@ if ($tenantName === '') {
|
||||
}
|
||||
|
||||
$loginUrl = $scope === 'tenant'
|
||||
? ($tenantSlug !== '' ? tenant_url($tenantSlug, 'login') : '/')
|
||||
: '/admin/login';
|
||||
? ($tenantSlug !== '' ? tenant_url($tenantSlug, 'login') : url('/'))
|
||||
: url('/admin/login');
|
||||
$emailLabel = $scope === 'tenant' ? 'Login-E-Mail' : 'Admin-E-Mail';
|
||||
require __DIR__ . '/../partials/layout-top.php';
|
||||
?>
|
||||
@@ -46,7 +46,7 @@ require __DIR__ . '/../partials/layout-top.php';
|
||||
</section>
|
||||
|
||||
<div class="two-column">
|
||||
<form class="card form-card" method="post" action="<?= e(current_path()) ?>">
|
||||
<form class="card form-card" method="post" action="<?= e(url(current_path())) ?>">
|
||||
<?= csrf_field($csrf) ?>
|
||||
<input type="hidden" name="scope" value="<?= e($scope) ?>">
|
||||
<?php if ($tenantSlug !== ''): ?>
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<p class="lead">Aktuell wird der Ablauf mit ausgewaehlten Teams verfeinert: Pilotmandanten koennen sich registrieren, Mitglieder fuer die Selbstbuchung anlegen und Backoffice-Prozesse fuer Papierlisten, Einzahlungen und spaetere RFID-Anbindung realistisch testen.</p>
|
||||
<div class="button-row">
|
||||
<?php if ($setupComplete): ?>
|
||||
<a class="button button-primary" href="/register">Pilotmandant anlegen</a>
|
||||
<a class="button button-secondary" href="/admin/login">Plattform-Login</a>
|
||||
<a class="button button-primary" href="<?= e(url('/register')) ?>">Pilotmandant anlegen</a>
|
||||
<a class="button button-secondary" href="<?= e(url('/admin/login')) ?>">Plattform-Login</a>
|
||||
<?php else: ?>
|
||||
<a class="button button-primary" href="/install">Installation starten</a>
|
||||
<a class="button button-primary" href="<?= e(url('/install')) ?>">Installation starten</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<ul class="metric-row">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</section>
|
||||
|
||||
<div class="two-column">
|
||||
<form class="card form-card" method="post" action="/register">
|
||||
<form class="card form-card" method="post" action="<?= e(url('/register')) ?>">
|
||||
<?= csrf_field($csrf) ?>
|
||||
<label>
|
||||
<span>Team- / Standortname</span>
|
||||
|
||||
@@ -3,10 +3,33 @@
|
||||
<section class="page-head">
|
||||
<span class="eyebrow">Setup</span>
|
||||
<h1>Plattform installieren</h1>
|
||||
<p>Der Installer schreibt `.env`, legt das MySQL-Schema an und erstellt den ersten Plattform-Admin. Danach ist das Self-Service-Onboarding fuer Mandanten freigeschaltet.</p>
|
||||
<p>Der Installer schreibt `.env`, legt das Datenbankschema an und erstellt den ersten Plattform-Admin. Danach ist das Self-Service-Onboarding fuer Mandanten freigeschaltet.</p>
|
||||
|
||||
<?php
|
||||
$availableDrivers = PDO::getAvailableDrivers();
|
||||
$hasMysql = in_array('mysql', $availableDrivers);
|
||||
$hasSqlite = in_array('sqlite', $availableDrivers);
|
||||
?>
|
||||
|
||||
<?php if (!$hasMysql && $hasSqlite): ?>
|
||||
<div class="alert alert-info">
|
||||
<strong>Hinweis:</strong> MySQL PDO-Treiber ist nicht verfügbar. Die Installation wird automatisch SQLite verwenden.
|
||||
Geben Sie "sqlite" als DB-Host ein, um SQLite explizit zu verwenden.
|
||||
</div>
|
||||
<?php elseif ($hasMysql && $hasSqlite): ?>
|
||||
<div class="alert alert-info">
|
||||
<strong>Datenbankoptionen:</strong> Sie können MySQL oder SQLite verwenden.
|
||||
Für SQLite geben Sie "sqlite" als DB-Host ein.
|
||||
</div>
|
||||
<?php elseif (!$hasMysql && !$hasSqlite): ?>
|
||||
<div class="alert alert-error">
|
||||
<strong>Fehler:</strong> Weder MySQL noch SQLite PDO-Treiber sind verfügbar.
|
||||
Bitte installieren Sie mindestens einen der Treiber.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<form class="card form-card" method="post" action="/install">
|
||||
<form class="card form-card" method="post" action="<?= e(url('/install')) ?>">
|
||||
<?= csrf_field($csrf) ?>
|
||||
<div class="form-grid">
|
||||
<label>
|
||||
|
||||
@@ -23,7 +23,7 @@ $isTenantAdmin = in_array($tenantRole, ['owner', 'admin'], true);
|
||||
<div class="page-backdrop"></div>
|
||||
<header class="site-header">
|
||||
<div class="shell header-inner">
|
||||
<a class="brand" href="/">
|
||||
<a class="brand" href="<?= e(url('/')) ?>">
|
||||
<span class="brand-mark">KK</span>
|
||||
<span>
|
||||
<strong><?= e($config['name']) ?></strong>
|
||||
@@ -32,24 +32,24 @@ $isTenantAdmin = in_array($tenantRole, ['owner', 'admin'], true);
|
||||
</a>
|
||||
<nav class="top-nav">
|
||||
<?php if ($hasTenantAccess): ?>
|
||||
<a href="<?= e(tenant_url($tenantSlug)) ?>" class="<?= $currentPath === tenant_url($tenantSlug) ? 'active' : '' ?>">Uebersicht</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'bookings')) ?>" class="<?= str_contains($currentPath, '/bookings') ? 'active' : '' ?>">Buchen</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug)) ?>" class="<?= $currentPath === tenant_path($tenantSlug) ? 'active' : '' ?>">Uebersicht</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'bookings')) ?>" class="<?= $currentPath === tenant_path($tenantSlug, 'bookings') ? 'active' : '' ?>">Buchen</a>
|
||||
<?php if ($isTenantAdmin): ?>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'members')) ?>" class="<?= str_contains($currentPath, '/members') ? 'active' : '' ?>">Mitglieder</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'products')) ?>" class="<?= str_contains($currentPath, '/products') ? 'active' : '' ?>">Produkte</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'payments')) ?>" class="<?= str_contains($currentPath, '/payments') ? 'active' : '' ?>">Einzahlungen</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'paper-sheets')) ?>" class="<?= str_contains($currentPath, '/paper-sheets') ? 'active' : '' ?>">Papierlisten</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'rfid')) ?>" class="<?= str_contains($currentPath, '/rfid') ? 'active' : '' ?>">RFID</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'members')) ?>" class="<?= $currentPath === tenant_path($tenantSlug, 'members') ? 'active' : '' ?>">Mitglieder</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'products')) ?>" class="<?= $currentPath === tenant_path($tenantSlug, 'products') ? 'active' : '' ?>">Produkte</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'payments')) ?>" class="<?= $currentPath === tenant_path($tenantSlug, 'payments') ? 'active' : '' ?>">Einzahlungen</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'paper-sheets')) ?>" class="<?= $currentPath === tenant_path($tenantSlug, 'paper-sheets') ? 'active' : '' ?>">Papierlisten</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'rfid')) ?>" class="<?= $currentPath === tenant_path($tenantSlug, 'rfid') ? 'active' : '' ?>">RFID</a>
|
||||
<?php endif; ?>
|
||||
<?php elseif ($tenantSlug !== ''): ?>
|
||||
<a href="/" class="<?= $currentPath === '/' ? 'active' : '' ?>">Start</a>
|
||||
<a href="/register" class="<?= $currentPath === '/register' ? 'active' : '' ?>">Pilot registrieren</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'login')) ?>" class="<?= $currentPath === tenant_url($tenantSlug, 'login') ? 'active' : '' ?>">Standort-Login</a>
|
||||
<a href="/admin/login" class="<?= str_starts_with($currentPath, '/admin') ? 'active' : '' ?>">Plattform</a>
|
||||
<a href="<?= e(url('/')) ?>" class="<?= $currentPath === '/' ? 'active' : '' ?>">Start</a>
|
||||
<a href="<?= e(url('/register')) ?>" class="<?= $currentPath === '/register' ? 'active' : '' ?>">Pilot registrieren</a>
|
||||
<a href="<?= e(tenant_url($tenantSlug, 'login')) ?>" class="<?= $currentPath === tenant_path($tenantSlug, 'login') ? 'active' : '' ?>">Standort-Login</a>
|
||||
<a href="<?= e(url('/admin/login')) ?>" class="<?= str_starts_with($currentPath, '/admin') ? 'active' : '' ?>">Plattform</a>
|
||||
<?php else: ?>
|
||||
<a href="/" class="<?= $currentPath === '/' ? 'active' : '' ?>">Start</a>
|
||||
<a href="/register" class="<?= $currentPath === '/register' ? 'active' : '' ?>">Pilot registrieren</a>
|
||||
<a href="/admin/login" class="<?= str_starts_with($currentPath, '/admin') ? 'active' : '' ?>">Plattform</a>
|
||||
<a href="<?= e(url('/')) ?>" class="<?= $currentPath === '/' ? 'active' : '' ?>">Start</a>
|
||||
<a href="<?= e(url('/register')) ?>" class="<?= $currentPath === '/register' ? 'active' : '' ?>">Pilot registrieren</a>
|
||||
<a href="<?= e(url('/admin/login')) ?>" class="<?= str_starts_with($currentPath, '/admin') ? 'active' : '' ?>">Plattform</a>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$resetRequestUrl = '/password/forgot?scope=tenant&tenantSlug=' . rawurlencode((string) $tenant['slug'])
|
||||
. '&tenantName=' . rawurlencode((string) $tenant['name']);
|
||||
$resetRequestUrl = url('/password/forgot?scope=tenant&tenantSlug=' . rawurlencode((string) $tenant['slug'])
|
||||
. '&tenantName=' . rawurlencode((string) $tenant['name']));
|
||||
require __DIR__ . '/../partials/layout-top.php';
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user