resources/views/statistics/individuals/top10-list.phtml
<?php
declare(strict_types=1);
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Individual;
/**
* @var array<array{age:string,person:Individual}> $records
*/
?>
<?php if ($records !== []) : ?>
<ul class="list-group list-group-flush">
<?php foreach ($records as $record) : ?>
<?php $person = $record['person']; ?>
<li class="list-group-item d-flex justify-content-between align-items-center">
<a href="<?= e($person->url()) ?>"><?= $person->fullName() ?></a>
<span class="badge bg-secondary rounded-pill ms-3"><?= $record['age'] ?></span>
</li>
<?php endforeach; ?>
</ul>
<?php else : ?>
<div class="card-body">
<?= I18N::translate('This information is not available.') ?>
</div>
<?php endif; ?>