![]() 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/modules/family_nav/ |
Upload File : |
<?php declare(strict_types=1); use Fisharebest\Webtrees\Family; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Individual; use Fisharebest\Webtrees\Services\RelationshipService; /** * @var Individual $individual * @var Family $family * @var string $title */ ?> <table class="table table-sm wt-facts-table wt-family-navigator-family"> <caption class="text-center wt-family-navigator-family-heading"> <a href="<?= e($family->url()) ?>"> <?= $title ?> </a> </caption> <tbody> <?php foreach ($family->spouses() as $spouse) : ?> <tr class="text-center wt-family-navigator-parent wt-sex-<?= strtolower($spouse->sex()) ?>"> <th class="align-middle wt-family-navigator-label" scope="row"> <?php if ($spouse === $individual) : ?> <?= app(RelationshipService::class)->getCloseRelationshipName($individual, $spouse) ?> <i class="icon-selected"></i> <?php elseif ($spouse->childFamilies()->isNotEmpty()) : ?> <div class="dropdown"> <a class="dropdown-toggle" href="#" role="button" id="dropdown-<?= e($spouse->xref()) ?>" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <?= app(RelationshipService::class)->getCloseRelationshipName($individual, $spouse) ?> </a> <div class="dropdown-menu wt-family-navigator-dropdown"> <?php foreach ($spouse->childFamilies() as $n => $spouse_child_family) : ?> <?php if ($n > 0) : ?> <div class="dropdown-divider"></div> <?php endif ?> <a class="dropdown-header wt-family-navigator-dropdown-heading" href="<?= e($spouse_child_family->url()) ?>"> <?= I18N::translate('Parents') ?> </a> <?php foreach ($spouse_child_family->spouses() as $parent) : ?> <a class="dropdown-item" href="<?= e($parent->url()) ?>"> <?= $parent->fullName() ?> </a> <?php endforeach ?> <?php endforeach ?> </div> </div> <?php else : ?> <?= app(RelationshipService::class)->getCloseRelationshipName($individual, $spouse) ?> <?php endif ?> </th> <td class="wt-family-navigator-name"> <?php if ($spouse->canShow()) : ?> <a href="<?= e($spouse->url()) ?>"> <?= $spouse->fullName() ?> </a> <div class="small"> <?= $spouse->lifespan() ?> </div> <?php else : ?> <?= $spouse->fullName() ?> <?php endif ?> </td> </tr> <?php endforeach ?> <?php foreach ($family->children() as $child) : ?> <tr class="text-center wt-family-navigator-child wt-sex-<?= strtolower($child->sex()) ?>"> <th class="align-middle wt-family-navigator-label" scope="row"> <?php if ($child === $individual) : ?> <?= app(RelationshipService::class)->getCloseRelationshipName($individual, $child) ?> <i class="icon-selected"></i> <?php elseif ($child->spouseFamilies()->isNotEmpty()) : ?> <div class="dropdown"> <a class="dropdown-toggle" href="#" role="button" id="dropdown-<?= e($child->xref()) ?>" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <?= app(RelationshipService::class)->getCloseRelationshipName($individual, $child) ?> </a> <div class="dropdown-menu"> <?php foreach ($child->spouseFamilies() as $n => $in_laws) : ?> <?php if ($n > 0) : ?> <div class="dropdown-divider"></div> <?php endif ?> <a class="dropdown-header wt-family-navigator-dropdown-heading" href="<?= e($in_laws->url()) ?>"> <?= I18N::translate('Family') ?> </a> <?php foreach ($in_laws->spouses() as $sibling_in_law) : ?> <?php if ($sibling_in_law !== $child) : ?> <a class="dropdown-item" href="<?= e($sibling_in_law->url()) ?>"> <?= $sibling_in_law->fullName() ?> </a> <?php endif ?> <?php endforeach ?> <ul> <?php foreach ($in_laws->children() as $child_in_law) : ?> <li> <a class="dropdown-item" href="<?= e($child_in_law->url()) ?>"> <?= $child_in_law->fullName() ?> </a> </li> <?php endforeach ?> </ul> <?php endforeach ?> </div> </div> <?php else : ?> <?= app(RelationshipService::class)->getCloseRelationshipName($individual, $child) ?> <?php endif ?> </th> <td> <?php if ($child->canShow()) : ?> <a href="<?= e($child->url()) ?>"> <?= $child->fullName() ?> </a> <div class="small"> <?= $child->lifespan() ?> </div> <?php else : ?> <?= $child->fullName() ?> <?php endif ?> </td> </tr> <?php endforeach ?> </tbody> </table>