xref: /webtrees/resources/views/statistics/families/top10-list-grand.phtml (revision 4b3ef6caf72914d34581bb4a8d677e615e877a9b)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Family;
6use Fisharebest\Webtrees\I18N;
7
8/* @var array  $records */
9/* @var Family $family */
10?>
11
12<?php if ($records) : ?>
13    <ul class="list-group list-group-flush">
14        <?php foreach ($records as $record) : ?>
15            <?php $family = $record['family']; ?>
16            <li class="list-group-item d-flex justify-content-between align-items-center">
17                <a href="<?= e($family->url()) ?>"><?= $family->fullName() ?></a>
18                <span class="badge badge-secondary badge-pill ml-3">
19                    <?= I18N::plural('%s grandchild', '%s grandchildren', $record['count'], I18N::number($record['count'])) ?>
20                </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