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