update
This commit is contained in:
parent
ab2311587c
commit
9fcd228eb2
13 changed files with 398 additions and 14 deletions
|
|
@ -16,6 +16,18 @@ $euro = fn($amount) => number_format($amount, 2, ',', '.') . ' €';
|
|||
<p><?php echo htmlspecialchars($currentSeason['name']); ?>, Stand: <?php echo htmlspecialchars($result['rounds'][$result['max_round_id']]['round']['name']); ?>
|
||||
<?php if (!$result['is_final']): ?>(ohne Platzierungsgeld, das erst nach der letzten Runde feststeht)<?php endif; ?></p>
|
||||
|
||||
<?php
|
||||
$anyPayout = false;
|
||||
foreach ($moneyRanking as $entry) {
|
||||
if ($entry['amount'] > 0) {
|
||||
$anyPayout = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($anyPayout): ?>
|
||||
<button type="button" id="iban-toggle-all">IBANs anzeigen</button>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="table-container">
|
||||
<table class="accounts-table">
|
||||
<thead>
|
||||
|
|
@ -30,14 +42,22 @@ $euro = fn($amount) => number_format($amount, 2, ',', '.') . ' €';
|
|||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($moneyRanking as $entry):
|
||||
$missingAccount = $entry['amount'] > 0 && empty($entry['iban']) && empty($entry['kontonr']);
|
||||
$hasPayout = $entry['amount'] > 0;
|
||||
$missingAccount = $hasPayout && empty($entry['iban']) && empty($entry['kontonr']);
|
||||
?>
|
||||
<tr <?php if ($entry['amount'] <= 0) echo 'class="no-payout"'; ?>>
|
||||
<tr <?php if (!$hasPayout) echo 'class="no-payout"'; ?>>
|
||||
<td><a href="/index.php?page=money_ranking&user_id=<?php echo (int)$entry['user_id']; ?>"><?php echo htmlspecialchars($entry['name']); ?></a></td>
|
||||
<td class="amount"><?php echo $euro($entry['amount']); ?></td>
|
||||
<td><?php echo htmlspecialchars((string)$entry['bankname']); ?></td>
|
||||
<td class="iban <?php if ($missingAccount) echo 'missing'; ?>">
|
||||
<?php echo $missingAccount ? 'fehlt' : htmlspecialchars((string)$entry['iban']); ?>
|
||||
<?php if ($missingAccount): ?>
|
||||
fehlt
|
||||
<?php else: ?>
|
||||
<span class="iban-masked"><?php echo htmlspecialchars((string)$entry['iban_masked']); ?></span>
|
||||
<?php if ($hasPayout): ?>
|
||||
<span class="iban-full" hidden><?php echo htmlspecialchars((string)$entry['iban']); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo htmlspecialchars((string)$entry['blz']); ?></td>
|
||||
<td><?php echo htmlspecialchars((string)$entry['kontonr']); ?></td>
|
||||
|
|
@ -61,6 +81,23 @@ $euro = fn($amount) => number_format($amount, 2, ',', '.') . ' €';
|
|||
.accounts-table td.missing { color: #c00; font-family: inherit; font-weight: bold; }
|
||||
.accounts-table tr.no-payout td { color: #999; }
|
||||
.accounts-table tr.no-payout td a { color: #999; }
|
||||
#iban-toggle-all { margin-bottom: 0.75em; cursor: pointer; }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var ibanToggleAll = document.getElementById('iban-toggle-all');
|
||||
if (ibanToggleAll) {
|
||||
ibanToggleAll.addEventListener('click', function () {
|
||||
var show = ibanToggleAll.getAttribute('data-visible') !== '1';
|
||||
document.querySelectorAll('.iban-full').forEach(function (full) {
|
||||
full.hidden = !show;
|
||||
var masked = full.parentElement.querySelector('.iban-masked');
|
||||
if (masked) masked.hidden = show;
|
||||
});
|
||||
ibanToggleAll.setAttribute('data-visible', show ? '1' : '0');
|
||||
ibanToggleAll.textContent = show ? 'IBANs verbergen' : 'IBANs anzeigen';
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php require __DIR__ . '/../partials/footer.php'; ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue