xref: /webtrees/resources/views/statistics/other/top10-list.phtml (revision 1270d2767576ed4a83917769b0ee3613e3b010bf)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Place;
7
8/**
9 * @var array<array{count:int,place:Place}> $records
10 */
11?>
12
13<?php if ($records !== []) : ?>
14    <ul class="list-group list-group-flush">
15        <?php foreach ($records as $record) : ?>
16            <?php $place = $record['place']; ?>
17            <li class="list-group-item d-flex justify-content-between align-items-center">
18                <a href="<?= e($place->url()) ?>"><?= $place->fullName() ?></a>
19                <span class="badge bg-secondary rounded-pill ms-3"><?= I18N::number($record['count']) ?></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