xref: /webtrees/resources/views/statistics/individuals/top10-list.phtml (revision 9d0b3f1de300eb3e37065877935f4bc0cb6f1489)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Individual;
7
8/**
9 * @var array<array{age:string,person:Individual}> $records
10 */
11
12?>
13
14<?php if ($records !== []) : ?>
15    <ul class="list-group list-group-flush">
16        <?php foreach ($records as $record) : ?>
17            <?php $person = $record['person']; ?>
18            <li class="list-group-item d-flex justify-content-between align-items-center">
19                <a href="<?= e($person->url()) ?>"><?= $person->fullName() ?></a>
20                <span class="badge bg-secondary rounded-pill ms-3"><?= $record['age'] ?></span>
21            </li>
22        <?php endforeach; ?>
23    </ul>
24<?php else : ?>
25    <div class="card-body">
26        <?= I18N::translate('This information is not available.') ?>
27    </div>
28<?php endif; ?>
29