xref: /webtrees/resources/views/lists/surnames-bullet-list.phtml (revision 9991924fa6a0aa95eb3163fcd21c55460086f641)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Module\IndividualListModule;
7use Fisharebest\Webtrees\Module\ModuleListInterface;
8use Fisharebest\Webtrees\Tree;
9
10/**
11 * @var IndividualListModule|null $module
12 * @var array<array<int>>         $surnames
13 * @var bool                      $totals
14 * @var Tree                      $tree
15 */
16
17?>
18
19<ul class="wt-surnames-bullet-list">
20    <?php foreach ($surnames as $surn => $surns) : ?>
21        <?php foreach ($surns as $spfxsurn => $count) : ?>
22            <li class="wt-surnames-column-list-item">
23                <?php if ($module instanceof ModuleListInterface) : ?>
24                    <a href="<?= e($module->listUrl($tree, ['surname' => $surn])) ?>">
25                        <?= $totals ? I18N::translate('%1$s (%2$s)', '<bdi>' . e($spfxsurn) . '</bdi>', I18N::number($count)) : e($spfxsurn) ?>
26                    </a>
27                <?php else : ?>
28                    <?= $totals ? I18N::translate('%1$s (%2$s)', '<bdi>' . e($spfxsurn) . '</bdi>', I18N::number($count)) : e($spfxsurn) ?>
29                <?php endif ?>
30            </li>
31        <?php endforeach ?>
32    <?php endforeach ?>
33</ul>
34