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