![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/webtrees/resources/views/lists/ |
Upload File : |
<?php declare(strict_types=1); use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Individual; use Fisharebest\Webtrees\Module\IndividualListModule; use Fisharebest\Webtrees\Module\ModuleListInterface; use Fisharebest\Webtrees\Tree; /** * @var IndividualListModule|null $module * @var array<array<int>> $surnames * @var bool $totals * @var Tree $tree */ $items = []; foreach ($surnames as $surn => $surns) { foreach ($surns as $surname => $count) { if ($surname === Individual::NOMEN_NESCIO) { $label = I18N::translateContext('Unknown surname', '…'); $url = $module instanceof ModuleListInterface ? $module->listUrl($tree, ['alpha' => '@']) : ''; } elseif ($surname === '') { $label = e($surn); $url = $module instanceof ModuleListInterface ? $module->listUrl($tree, ['surname' => $surn]) : ''; } else { $label = e($surname); $url = $module instanceof ModuleListInterface ? $module->listUrl($tree, ['surname' => $surn]) : ''; } if ($totals) { $item = I18N::translate('%1$s (%2$s)', '<span class="ut">' . $label . '</span>', I18N::number($count)); } else { $item = $label; } if ($url !== '') { $items[] = '<a class="wt-surnames-compact-list-item" href="' . e($url) . '">' . $item . '</a>'; } else { $items[] = '<span class="wt-surnames-compact-list-item">' . $item . '</span>'; } } } ?> <span class="wt-surnames-compact-list"><?= implode(I18N::$list_separator, $items) ?></span>