Improve channel management layout

This commit is contained in:
Gogs
2026-07-06 21:38:55 +02:00
parent 52aa07ab98
commit edf4d3d389
2 changed files with 104 additions and 32 deletions
+33 -32
View File
@@ -4,41 +4,42 @@
<form method="post" class="settings-form">
<div class="settings-header">
<h2>Senderverwaltung</h2>
<div>
<h2>Senderverwaltung</h2>
<p class="settings-subtitle">Aktiviere Sender, markiere Favoriten und ändere die Reihenfolge.</p>
</div>
<button type="submit">Speichern</button>
</div>
<table class="channels-table">
<thead>
<tr>
<th>Nr.</th>
<th>Aktiv</th>
<th>Favorit</th>
<th>Sender</th>
<th>Gruppe</th>
</tr>
</thead>
<tbody>
<?php foreach ($channelConfig as $id => $channel): ?>
<tr>
<td>
<input class="number-input" type="number" name="number[<?= htmlspecialchars($id) ?>]" value="<?= (int)($channel['number'] ?? 999999) ?>">
</td>
<td>
<div class="channel-settings-list">
<?php foreach ($channelConfig as $id => $channel): ?>
<article class="channel-settings-card">
<div class="channel-settings-main">
<label class="switch-row">
<input type="checkbox" name="enabled[<?= htmlspecialchars($id) ?>]" <?= !empty($channel['enabled']) ? 'checked' : '' ?>>
</td>
<td>
<input type="checkbox" name="favorite[<?= htmlspecialchars($id) ?>]" <?= !empty($channel['favorite']) ? 'checked' : '' ?>>
</td>
<td>
<strong><?= htmlspecialchars($channel['name'] ?? $id) ?></strong>
<div class="channel-id"><?= htmlspecialchars($id) ?></div>
</td>
<td>
<span class="channel-settings-title"><?= htmlspecialchars($channel['name'] ?? $id) ?></span>
</label>
<div class="channel-id"><?= htmlspecialchars($id) ?></div>
</div>
<div class="channel-settings-fields">
<label>
Nummer
<input class="number-input" type="number" name="number[<?= htmlspecialchars($id) ?>]" value="<?= (int)($channel['number'] ?? 999999) ?>">
</label>
<label>
Gruppe
<input type="text" name="group[<?= htmlspecialchars($id) ?>]" value="<?= htmlspecialchars($channel['group'] ?? 'Unknown') ?>">
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</label>
<label class="favorite-toggle">
<input type="checkbox" name="favorite[<?= htmlspecialchars($id) ?>]" <?= !empty($channel['favorite']) ? 'checked' : '' ?>>
⭐ Favorit
</label>
</div>
</article>
<?php endforeach; ?>
</div>
</form>