306 lines
14 KiB
HTML
306 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Admin-Bereich - Turnierverwaltung</title>
|
|
<link rel="stylesheet" href="/css/style.css">
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<a href="/admin.html" class="active">Admin</a>
|
|
<a href="/referee.html">Schiedsrichter</a>
|
|
<a href="/spectator.html">Zuschauer</a>
|
|
<a href="#" id="logout-button" style="float: right;">Logout</a>
|
|
</nav>
|
|
|
|
<div class="container">
|
|
<h1>Admin-Bereich</h1>
|
|
<p id="welcome-message">Willkommen!</p>
|
|
|
|
<div id="login-section" class="auth-form">
|
|
<h2>Login</h2>
|
|
<form id="login-form">
|
|
<div>
|
|
<label for="login-username">Benutzername:</label>
|
|
<input type="text" id="login-username" required>
|
|
</div>
|
|
<div>
|
|
<label for="login-password">Passwort:</label>
|
|
<input type="password" id="login-password" required>
|
|
</div>
|
|
<button type="submit">Login</button>
|
|
<div id="login-error" class="error-message hidden"></div>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="admin-content" class="hidden">
|
|
|
|
<section id="tournament-management" class="content-section">
|
|
<div class="section-header">
|
|
<h2>Turnierverwaltung</h2>
|
|
<button id="show-add-tournament-form">Neues Turnier hinzufügen</button>
|
|
</div>
|
|
|
|
<form id="tournament-form" class="hidden">
|
|
<h3 id="tournament-form-title">Neues Turnier hinzufügen</h3>
|
|
<input type="hidden" id="tournament-id"> <div>
|
|
<label for="tournament-name">Name:</label>
|
|
<input type="text" id="tournament-name" required>
|
|
</div>
|
|
<div>
|
|
<label for="tournament-date">Datum:</label>
|
|
<input type="date" id="tournament-date">
|
|
</div>
|
|
<div>
|
|
<label for="tournament-location">Ort:</label>
|
|
<input type="text" id="tournament-location">
|
|
</div>
|
|
<div>
|
|
<label for="tournament-type">Turnier-Typ:</label>
|
|
<select id="tournament-type" required>
|
|
<option value="knockout">KO-System</option>
|
|
<option value="group">Gruppenphase</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="tournament-game-type">Spiel-Typ (Punkte pro Satz):</label>
|
|
<select id="tournament-game-type" required>
|
|
<option value="11_points">11 Punkte</option>
|
|
<option value="21_points">21 Punkte</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="tournament-max-players">Max. Spieler (optional):</label>
|
|
<input type="number" id="tournament-max-players" min="0">
|
|
</div>
|
|
<div>
|
|
<label for="tournament-status">Status:</label>
|
|
<select id="tournament-status">
|
|
<option value="planned">Geplant</option>
|
|
<option value="running">Laufend</option>
|
|
<option value="finished">Beendet</option>
|
|
<option value="cancelled">Abgesagt</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="tournament-description">Beschreibung:</label>
|
|
<textarea id="tournament-description"></textarea>
|
|
</div>
|
|
<button type="submit" id="save-tournament-button">Speichern</button>
|
|
<button type="button" id="cancel-tournament-button" class="secondary">Abbrechen</button>
|
|
<div id="tournament-form-error" class="error-message hidden"></div>
|
|
</form>
|
|
|
|
<div id="tournament-list-message" class="message-area hidden"></div> <table id="tournament-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Datum</th>
|
|
<th>Ort</th>
|
|
<th>Typ</th>
|
|
<th>Status</th>
|
|
<th>Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="tournament-list">
|
|
</tbody>
|
|
</table>
|
|
<p id="loading-tournaments" class="loading-indicator hidden">Lade Turniere...</p>
|
|
</section>
|
|
|
|
<section id="player-management" class="content-section">
|
|
<div class="section-header">
|
|
<h2>Spielerverwaltung</h2>
|
|
<div>
|
|
<input type="text" id="player-search" placeholder="Spieler suchen..." style="width: auto; display: inline-block; margin-right: 10px;">
|
|
<button id="show-add-player-form">Neuen Spieler hinzufügen</button>
|
|
</div>
|
|
</div>
|
|
|
|
<form id="player-form" class="hidden">
|
|
<h3 id="player-form-title">Neuen Spieler hinzufügen</h3>
|
|
<input type="hidden" id="player-id">
|
|
<div>
|
|
<label for="player-first-name">Vorname:</label>
|
|
<input type="text" id="player-first-name" required>
|
|
</div>
|
|
<div>
|
|
<label for="player-last-name">Nachname:</label>
|
|
<input type="text" id="player-last-name" required>
|
|
</div>
|
|
<div>
|
|
<label for="player-club">Verein:</label>
|
|
<input type="text" id="player-club">
|
|
</div>
|
|
<div>
|
|
<label for="player-qttr">QTTR-Punkte:</label>
|
|
<input type="number" id="player-qttr" min="0">
|
|
</div>
|
|
<div>
|
|
<label for="player-age-class">Altersklasse:</label>
|
|
<input type="text" id="player-age-class" placeholder="z.B. Herren A, U18">
|
|
</div>
|
|
<button type="submit" id="save-player-button">Speichern</button>
|
|
<button type="button" id="cancel-player-button" class="secondary">Abbrechen</button>
|
|
<div id="player-form-error" class="error-message hidden"></div>
|
|
</form>
|
|
|
|
<div id="player-list-message" class="message-area hidden"></div>
|
|
|
|
<table id="player-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Nachname</th>
|
|
<th>Vorname</th>
|
|
<th>Verein</th>
|
|
<th>QTTR</th>
|
|
<th>Altersklasse</th>
|
|
<th>Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="player-list">
|
|
</tbody>
|
|
</table>
|
|
<p id="loading-players" class="loading-indicator hidden">Lade Spieler...</p>
|
|
</section>
|
|
|
|
<section id="user-management" class="content-section">
|
|
<div class="section-header">
|
|
<h2>Benutzerverwaltung</h2>
|
|
<button id="show-add-user-form">Neuen Benutzer hinzufügen</button>
|
|
</div>
|
|
|
|
<form id="user-form" class="hidden">
|
|
<h3 id="user-form-title">Neuen Benutzer hinzufügen</h3>
|
|
<input type="hidden" id="user-id">
|
|
<div>
|
|
<label for="user-username">Benutzername:</label>
|
|
<input type="text" id="user-username" required>
|
|
</div>
|
|
<div>
|
|
<label for="user-password">Passwort:</label>
|
|
<input type="password" id="user-password">
|
|
<small>Beim Bearbeiten leer lassen, um das Passwort nicht zu ändern.</small>
|
|
</div>
|
|
<div>
|
|
<label for="user-role">Rolle:</label>
|
|
<select id="user-role" required>
|
|
<option value="spectator">Zuschauer</option>
|
|
<option value="referee">Schiedsrichter</option>
|
|
<option value="admin">Admin</option>
|
|
</select>
|
|
</div>
|
|
<button type="submit" id="save-user-button">Speichern</button>
|
|
<button type="button" id="cancel-user-button" class="secondary">Abbrechen</button>
|
|
<div id="user-form-error" class="error-message hidden"></div>
|
|
</form>
|
|
|
|
<div id="user-list-message" class="message-area hidden"></div>
|
|
|
|
<table id="user-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Benutzername</th>
|
|
<th>Rolle</th>
|
|
<th>Erstellt am</th>
|
|
<th>Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="user-list">
|
|
</tbody>
|
|
</table>
|
|
<p id="loading-users" class="loading-indicator hidden">Lade Benutzer...</p>
|
|
</section>
|
|
|
|
<section id="match-management" class="content-section">
|
|
<div class="section-header">
|
|
<h2>Spielverwaltung & Ergebnisse</h2>
|
|
<div>
|
|
<label for="select-tournament-for-matches" style="margin-right: 10px;">Turnier anzeigen:</label>
|
|
<select id="select-tournament-for-matches">
|
|
<option value="">-- Turnier wählen --</option>
|
|
</select>
|
|
<button id="show-add-match-form" disabled>Neues Spiel hinzufügen</button>
|
|
</div>
|
|
</div>
|
|
|
|
<form id="match-form" class="hidden">
|
|
<h3 id="match-form-title">Neues Spiel hinzufügen</h3>
|
|
<input type="hidden" id="match-id">
|
|
<input type="hidden" id="match-form-tournament-id"> <div>
|
|
<label for="match-round">Runde:</label>
|
|
<input type="number" id="match-round" min="1">
|
|
</div>
|
|
<div>
|
|
<label for="match-number-in-round">Spiel Nr. in Runde:</label>
|
|
<input type="number" id="match-number-in-round" min="1">
|
|
</div>
|
|
<div>
|
|
<label for="match-player1">Spieler 1:</label>
|
|
<select id="match-player1"><option value="">-- Spieler wählen --</option></select>
|
|
</div>
|
|
<div>
|
|
<label for="match-player2">Spieler 2:</label>
|
|
<select id="match-player2"><option value="">-- Spieler wählen --</option></select>
|
|
</div>
|
|
<div>
|
|
<label for="match-scheduled-time">Geplante Zeit:</label>
|
|
<input type="datetime-local" id="match-scheduled-time">
|
|
</div>
|
|
<div>
|
|
<label for="match-table-number">Tisch Nr.:</label>
|
|
<input type="text" id="match-table-number">
|
|
</div>
|
|
<div>
|
|
<label for="match-status">Status:</label>
|
|
<select id="match-status">
|
|
<option value="scheduled">Geplant</option>
|
|
<option value="ongoing">Laufend</option>
|
|
<option value="finished">Beendet</option>
|
|
<option value="postponed">Verschoben</option>
|
|
</select>
|
|
</div>
|
|
|
|
<button type="submit" id="save-match-button">Speichern</button>
|
|
<button type="button" id="cancel-match-button" class="secondary">Abbrechen</button>
|
|
<div id="match-form-error" class="error-message hidden"></div>
|
|
</form>
|
|
|
|
<div id="match-list-message" class="message-area hidden"></div>
|
|
|
|
<table id="match-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Runde</th>
|
|
<th>Spiel Nr.</th>
|
|
<th>Spieler 1</th>
|
|
<th>Spieler 2</th>
|
|
<th>Ergebnis</th> <th>Status</th>
|
|
<th>Geplant</th>
|
|
<th>Tisch</th>
|
|
<th>Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="match-list">
|
|
</tbody>
|
|
</table>
|
|
<p id="loading-matches" class="loading-indicator hidden">Lade Spiele...</p>
|
|
<p id="select-tournament-prompt" class="">Bitte oben ein Turnier auswählen, um Spiele anzuzeigen.</p>
|
|
|
|
</section>
|
|
|
|
<section id="statistics-section" class="content-section">
|
|
<h2>Statistiken</h2>
|
|
<p>Anzeige von Statistiken (Spielergebnisse, Quoten etc.) wird hier implementiert.</p>
|
|
</section>
|
|
|
|
<section id="settings-section" class="content-section">
|
|
<h2>Einstellungen</h2>
|
|
<p>Einstellungen (z.B. Backup-Intervall) werden hier implementiert.</p>
|
|
</section>
|
|
|
|
</div> </div> <script src="/js/admin.js"></script>
|
|
</body>
|
|
</html>
|