dsadsa
All checks were successful
Deploy / deploy (push) Successful in 54s

This commit is contained in:
2026-08-17 00:24:57 +02:00
parent 9d5bad8294
commit 0d384cee2d
10 changed files with 237 additions and 17 deletions

View File

@@ -340,6 +340,64 @@ if (!empty($canManageSystemSettings)) {
<h2>Profil-Levels</h2>
</div>
<div class="account-panel__body">
<div class="card" style="margin-bottom:18px;">
<strong>Benutzer suchen</strong>
<form method="get" class="stack gap-12" style="margin-top:14px;">
<input type="hidden" name="section" value="profile-levels">
<div class="form-grid">
<div class="stack gap-6">
<label class="label" for="profileLevelUserQuery">Name oder E-Mail</label>
<input id="profileLevelUserQuery" name="profile_level_user_query" class="input" value="<?= htmlspecialchars((string)($profileLevelUserSearchQuery ?? ''), ENT_QUOTES) ?>">
</div>
<div class="stack gap-6" style="justify-content:end;">
<span class="label" aria-hidden="true">&nbsp;</span>
<button class="btn" type="submit">Suchen</button>
</div>
</div>
</form>
<?php if (!empty($profileLevelUserSearchResults)): ?>
<div class="stack gap-12" style="margin-top:18px;">
<?php foreach ($profileLevelUserSearchResults as $searchedUser): ?>
<div class="card" style="padding:14px;">
<div class="flex between center-y" style="gap:12px; flex-wrap:wrap;">
<div>
<strong><?= htmlspecialchars((string)($searchedUser['display_name'] ?: trim(((string)($searchedUser['first_name'] ?? '')) . ' ' . ((string)($searchedUser['last_name'] ?? ''))) ?: 'Mitglied'), ENT_QUOTES) ?></strong>
<div class="muted small" style="margin-top:6px;">
ID: <?= (int)($searchedUser['id'] ?? 0) ?> ·
<?= htmlspecialchars((string)($searchedUser['email'] ?? ''), ENT_QUOTES) ?> ·
Punkte: <?= number_format((float)($searchedUser['community_points'] ?? 0), 1, ',', '.') ?> ·
Level: <?= htmlspecialchars(trim(((string)(($searchedUser['community_level']['icon'] ?? ''))) . ' ' . ((string)(($searchedUser['community_level']['label'] ?? '')))), ENT_QUOTES) ?>
</div>
<?php if (!empty($searchedUser['roles'])): ?>
<div class="muted small" style="margin-top:6px;">System-Level: <?= htmlspecialchars(implode(', ', array_map('strval', (array)$searchedUser['roles'])), ENT_QUOTES) ?></div>
<?php endif; ?>
</div>
</div>
<form method="post" class="stack gap-12" style="margin-top:14px;">
<input type="hidden" name="action" value="community_points_adjust">
<input type="hidden" name="target_user_id" value="<?= (int)($searchedUser['id'] ?? 0) ?>">
<div class="form-grid">
<div class="stack gap-6">
<label class="label" for="communityPointsAmount<?= (int)($searchedUser['id'] ?? 0) ?>">Punkte erhöhen</label>
<input id="communityPointsAmount<?= (int)($searchedUser['id'] ?? 0) ?>" name="points_amount" class="input" type="number" min="0.1" step="0.1" required>
</div>
<div class="stack gap-6">
<label class="label" for="communityPointsReason<?= (int)($searchedUser['id'] ?? 0) ?>">Begründung</label>
<input id="communityPointsReason<?= (int)($searchedUser['id'] ?? 0) ?>" name="points_reason" class="input" required>
</div>
</div>
<div class="flex gap-12" style="flex-wrap:wrap;">
<button class="btn" type="submit">Punkte vergeben</button>
</div>
</form>
</div>
<?php endforeach; ?>
</div>
<?php elseif (($profileLevelUserSearchQuery ?? '') !== ''): ?>
<p class="muted small" style="margin-top:14px;">Keine passenden Benutzer gefunden.</p>
<?php endif; ?>
</div>
<div class="card">
<strong>Community-Levels</strong>
<div class="stack gap-12" style="margin-top:14px;">