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