Premades: class icon next to member class labels, invite tooltip

Members class label now shows the matching class icon to its left,
matching the class-action tile. The non-clickable placeholder on
non-invitable empty slots now carries a tooltip explaining why (no
manage rights, or no eligible members) instead of silently doing
nothing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-20 01:21:05 +02:00
parent 89ba2ebb35
commit 742a3c72c7
2 changed files with 23 additions and 2 deletions

View file

@ -902,6 +902,19 @@ input:focus, select:focus, textarea:focus {
gap: 0.1rem; gap: 0.1rem;
} }
.premade-slot-class {
display: inline-flex;
align-items: center;
gap: 0.3rem;
}
.premade-slot-class-icon {
width: 14px;
height: 14px;
object-fit: contain;
flex-shrink: 0;
}
.premade-slot-name strong { .premade-slot-name strong {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

View file

@ -204,8 +204,10 @@ include __DIR__ . '/includes/header.php';
<div class="premade-slot-inner"> <div class="premade-slot-inner">
<?php if ($isInvitable): ?> <?php if ($isInvitable): ?>
<button type="button" class="premade-slot-invite-btn" data-premade-id="<?= $premadeId ?>" title="Mitglied einladen">+</button> <button type="button" class="premade-slot-invite-btn" data-premade-id="<?= $premadeId ?>" title="Mitglied einladen">+</button>
<?php elseif (!$canManageThis): ?>
<span class="premade-slot-placeholder" title="Nur der Leiter oder Verwalter kann hier einladen">+</span>
<?php else: ?> <?php else: ?>
<span class="premade-slot-placeholder">+</span> <span class="premade-slot-placeholder" title="Aktuell gibt es keine einladbaren Mitglieder">+</span>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>
@ -226,7 +228,13 @@ include __DIR__ . '/includes/header.php';
<?php if ($slot['type'] === 'pending'): ?> <?php if ($slot['type'] === 'pending'): ?>
<span class="text-muted">Einladung offen</span> <span class="text-muted">Einladung offen</span>
<?php elseif (!empty($slot['class'])): ?> <?php elseif (!empty($slot['class'])): ?>
<span class="text-muted"><?= e($slot['class']) ?></span> <?php $slotClassIcon = class_icon_url($slot['class']); ?>
<span class="premade-slot-class">
<?php if ($slotClassIcon): ?>
<img class="premade-slot-class-icon" src="<?= e($slotClassIcon) ?>" alt="">
<?php endif; ?>
<span class="text-muted"><?= e($slot['class']) ?></span>
</span>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php if ($slot['type'] === 'lead'): ?> <?php if ($slot['type'] === 'lead'): ?>