1dd6b2bfcSGreg Roach<?php 2d70512abSGreg Roach 31b860509SRico Sonntagdeclare(strict_types=1); 41b860509SRico Sonntag 5054771e9SGreg Roachuse Fisharebest\Webtrees\Age; 61b860509SRico Sonntaguse Fisharebest\Webtrees\Date; 78fb4e87cSGreg Roachuse Fisharebest\Webtrees\Individual; 86b9cb339SGreg Roachuse Fisharebest\Webtrees\Registry; 9054771e9SGreg Roachuse Fisharebest\Webtrees\Family; 101b860509SRico Sonntaguse Fisharebest\Webtrees\I18N; 11054771e9SGreg Roachuse Fisharebest\Webtrees\Tree; 121b860509SRico Sonntaguse Fisharebest\Webtrees\View; 13054771e9SGreg Roachuse Illuminate\Support\Collection; 141b860509SRico Sonntag 15*55cc2880SGreg Roach// lists require a unique ID in case there are multiple lists per page 16*55cc2880SGreg Roach$table_id = Registry::idFactory()->id(); 1753432476SGreg Roach$today = new Date(strtoupper(date('d M Y'))); 18d97083feSGreg Roach$today_jd = Registry::timestampFactory()->now()->julianDay(); 19d97083feSGreg Roach$hundred_years_ago = Registry::timestampFactory()->now()->subtractYears(100)->julianDay(); 205373aac2SGreg Roach 21054771e9SGreg Roach/** 22054771e9SGreg Roach * @var Tree $tree 2336779af1SGreg Roach * @var Collection<int,Family> $families 24054771e9SGreg Roach */ 25054771e9SGreg Roach 26dd6b2bfcSGreg Roach?> 27dd6b2bfcSGreg Roach 28dd6b2bfcSGreg Roach<?php View::push('javascript') ?> 29dd6b2bfcSGreg Roach<script> 3032a5dd8dSGreg Roach$("#<?= e($table_id) ?> > .wt-table-family").dataTable({ 31dd6b2bfcSGreg Roach processing: true, 32dd6b2bfcSGreg Roach retrieve: true, 33dd6b2bfcSGreg Roach columns: [ 34dd6b2bfcSGreg Roach /* Given names */ { type: "text" }, 35dd6b2bfcSGreg Roach /* Surnames */ { type: "text" }, 36dd6b2bfcSGreg Roach /* Age */ { type: "num" }, 37dd6b2bfcSGreg Roach /* Given names */ { type: "text" }, 38dd6b2bfcSGreg Roach /* Surnames */ { type: "text" }, 39dd6b2bfcSGreg Roach /* Age */ { type: "num" }, 40dd6b2bfcSGreg Roach /* Marriage date */ { type: "num" }, 41dd6b2bfcSGreg Roach /* Anniversary */ { type: "num" }, 42dd6b2bfcSGreg Roach /* Marriage place */ { type: "text" }, 43dd6b2bfcSGreg Roach /* Children */ { type: "num" }, 44728c8c27SGreg Roach /* Last change */ { visible: <?= json_encode((bool) $tree->getPreference('SHOW_LAST_CHANGE'), JSON_THROW_ON_ERROR) ?> }, 45dd6b2bfcSGreg Roach /* Filter marriage */ { sortable: false }, 46dd6b2bfcSGreg Roach /* Filter alive/dead */ { sortable: false }, 47dd6b2bfcSGreg Roach /* Filter tree */ { sortable: false } 48dd6b2bfcSGreg Roach ], 491b860509SRico Sonntag sorting: [ 501b860509SRico Sonntag [1, "asc"] 51b6c326d8SGreg Roach ] 521b860509SRico Sonntag}); 531b860509SRico Sonntag 541b860509SRico Sonntag$("#<?= e($table_id) ?>") 55dd6b2bfcSGreg Roach /* Hide/show parents */ 564843b94fSGreg Roach .on("click", "#btn-toggle-parents", function() { 575e6816beSGreg Roach $(".wt-individual-list-parents").slideToggle(); 58dd6b2bfcSGreg Roach }) 59dd6b2bfcSGreg Roach /* Filter buttons in table header */ 60604bfd4bSGreg Roach .on("click", "input[data-filter-column]", function() { 61604bfd4bSGreg Roach let checkbox = $(this); 621b860509SRico Sonntag 63604bfd4bSGreg Roach // Deselect other options 643a976702SJonathan Jaubart let siblings = checkbox.siblings("input[type='checkbox']"); 653a976702SJonathan Jaubart siblings.prop("checked", false).removeAttr("checked"); 66604bfd4bSGreg Roach 67604bfd4bSGreg Roach // Apply (or clear) this filter 68604bfd4bSGreg Roach let checked = checkbox.prop("checked"); 69604bfd4bSGreg Roach let filter = checked ? checkbox.data("filter-value") : ""; 7032a5dd8dSGreg Roach let column = $("#<?= e($table_id) ?> .wt-table-family").DataTable().column(checkbox.data("filter-column")); 71604bfd4bSGreg Roach column.search(filter).draw(); 72604bfd4bSGreg Roach }); 73dd6b2bfcSGreg Roach</script> 74dd6b2bfcSGreg Roach<?php View::endpush() ?> 75dd6b2bfcSGreg Roach 7632a5dd8dSGreg Roach<div id="<?= e($table_id) ?>"> 7732a5dd8dSGreg Roach <table class="table table-bordered table-sm wt-table-family" 78b6c326d8SGreg Roach <?= view('lists/datatables-attributes') ?> 79b6c326d8SGreg Roach > 80dd6b2bfcSGreg Roach <thead> 81dd6b2bfcSGreg Roach <tr> 82dd6b2bfcSGreg Roach <th colspan="14"> 83dd6b2bfcSGreg Roach <div class="btn-toolbar d-flex justify-content-between mb-2"> 843a976702SJonathan Jaubart <div class="btn-group btn-group-sm" role="group"> 853a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-dead-N" class="btn-check" type="checkbox" data-filter-column="12" data-filter-value="N" autocomplete="off"> 863a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-dead-N" class="btn btn-outline-secondary btn-sm" title="' . I18N::translate('Show individuals who are alive or couples where both partners are alive.') ?>"> 87dd6b2bfcSGreg Roach <?= I18N::translate('Both alive') ?> 88604bfd4bSGreg Roach </label> 893a976702SJonathan Jaubart 903a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-dead-W" class="btn-check" type="checkbox" data-filter-column="12" data-filter-value="W" autocomplete="off"> 913a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-dead-W" class="btn btn-outline-secondary" title="<?= I18N::translate('Show couples where only the female partner is dead.') ?>"> 92dd6b2bfcSGreg Roach <?= I18N::translate('Widower') ?> 93604bfd4bSGreg Roach </label> 943a976702SJonathan Jaubart 953a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-dead-H" class="btn-check" type="checkbox" data-filter-column="12" data-filter-value="H" autocomplete="off"> 963a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-dead-H" class="btn btn-outline-secondary" title="<?= I18N::translate('Show couples where only the male partner is dead.') ?>"> 97dd6b2bfcSGreg Roach <?= I18N::translate('Widow') ?> 98604bfd4bSGreg Roach </label> 993a976702SJonathan Jaubart 1003a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-dead-Y" class="btn-check" type="checkbox" data-filter-column="12" data-filter-value="Y" autocomplete="off"> 1013a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-dead-Y" class="btn btn-outline-secondary" title="<?= I18N::translate('Show individuals who are dead or couples where both partners are dead.') ?>"> 102dd6b2bfcSGreg Roach <?= I18N::translate('Both dead') ?> 103604bfd4bSGreg Roach </label> 104dd6b2bfcSGreg Roach </div> 105604bfd4bSGreg Roach 1063a976702SJonathan Jaubart <div class="btn-group btn-group-sm" role="group"> 1073a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-roots-R" class="btn-check" type="checkbox" data-filter-column="13" data-filter-value="R" autocomplete="off"> 1083a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-roots-R" class="btn btn-outline-secondary" title="<?= I18N::translate('Show “roots” couples or individuals. These individuals may also be called “patriarchs”. They are individuals who have no parents recorded in the database.') ?>"> 109dd6b2bfcSGreg Roach <?= I18N::translate('Roots') ?> 110604bfd4bSGreg Roach </label> 1113a976702SJonathan Jaubart 1123a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-roots-L" class="btn-check" type="checkbox" data-filter-column="13" data-filter-value="L" autocomplete="off"> 1133a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-roots-L" class="btn btn-outline-secondary" title="<?= I18N::translate('Show “leaves” couples or individuals. These are individuals who are alive but have no children recorded in the database.') ?>"> 114dd6b2bfcSGreg Roach <?= I18N::translate('Leaves') ?> 115604bfd4bSGreg Roach </label> 116dd6b2bfcSGreg Roach </div> 117604bfd4bSGreg Roach 1183a976702SJonathan Jaubart <div class="btn-group btn-group-sm" role="group"> 1193a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-marr-U" class="btn-check" type="checkbox" data-filter-column="11" data-filter-value="U" autocomplete="off"> 1203a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-marr-U" class="btn btn-outline-secondary" title="<?= I18N::translate('Show couples with an unknown marriage date.') ?>"> 121b9597e06SGreg Roach <?= I18N::translate('Not married') ?> 122604bfd4bSGreg Roach </label> 1233a976702SJonathan Jaubart 1243a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-marr-YES" class="btn-check" type="checkbox" data-filter-column="11" data-filter-value="YES" autocomplete="off"> 1253a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-marr-YES" class="btn btn-outline-secondary" title="<?= I18N::translate('Show couples who married more than 100 years ago.') ?>"> 126dd6b2bfcSGreg Roach <?= I18N::translate('Marriage') ?>>100 127604bfd4bSGreg Roach </label> 1283a976702SJonathan Jaubart 1293a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-marr-Y100" class="btn-check" type="checkbox" data-filter-column="11" data-filter-value="Y100" autocomplete="off"> 1303a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-marr-Y100" class="btn btn-outline-secondary" title="<?= I18N::translate('Show couples who married within the last 100 years.') ?>"> 131dd6b2bfcSGreg Roach <?= I18N::translate('Marriage') ?><=100 132604bfd4bSGreg Roach </label> 1333a976702SJonathan Jaubart 1343a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-marr-D" class="btn-check" type="checkbox" data-filter-column="11" data-filter-value="D" autocomplete="off"> 1353a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-marr-D" class="btn btn-outline-secondary" title="<?= I18N::translate('Show divorced couples.') ?>"> 136dd6b2bfcSGreg Roach <?= I18N::translate('Divorce') ?> 137604bfd4bSGreg Roach </label> 1383a976702SJonathan Jaubart 1393a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-marr-M" class="btn-check" type="checkbox" data-filter-column="11" data-filter-value="M" autocomplete="off"> 1403a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-marr-M" class="btn btn-outline-secondary" title="<?= I18N::translate('Show couples where either partner married more than once.') ?>"> 141dd6b2bfcSGreg Roach <?= I18N::translate('Multiple marriages') ?> 142604bfd4bSGreg Roach </label> 143dd6b2bfcSGreg Roach </div> 144dd6b2bfcSGreg Roach </div> 145dd6b2bfcSGreg Roach </th> 146dd6b2bfcSGreg Roach </tr> 147dd6b2bfcSGreg Roach <tr> 148dd6b2bfcSGreg Roach <th><?= I18N::translate('Given names') ?></th> 149dd6b2bfcSGreg Roach <th><?= I18N::translate('Surname') ?></th> 150dd6b2bfcSGreg Roach <th><?= I18N::translate('Age') ?></th> 151dd6b2bfcSGreg Roach <th><?= I18N::translate('Given names') ?></th> 152dd6b2bfcSGreg Roach <th><?= I18N::translate('Surname') ?></th> 153dd6b2bfcSGreg Roach <th><?= I18N::translate('Age') ?></th> 154dd6b2bfcSGreg Roach <th><?= I18N::translate('Marriage') ?></th> 155e39fd5c6SGreg Roach <th> 156e39fd5c6SGreg Roach <span title="<?= I18N::translate('Anniversary') ?>"> 157e39fd5c6SGreg Roach <?= view('icons/anniversary') ?> 158e39fd5c6SGreg Roach </span> 159e39fd5c6SGreg Roach </th> 160dd6b2bfcSGreg Roach <th><?= I18N::translate('Place') ?></th> 161dd6b2bfcSGreg Roach <th><i class="icon-children" title="<?= I18N::translate('Children') ?>"></i></th> 162dd6b2bfcSGreg Roach <th><?= I18N::translate('Last change') ?></th> 163dd6b2bfcSGreg Roach <th hidden></th> 164dd6b2bfcSGreg Roach <th hidden></th> 165dd6b2bfcSGreg Roach <th hidden></th> 166dd6b2bfcSGreg Roach </tr> 167dd6b2bfcSGreg Roach </thead> 168dd6b2bfcSGreg Roach 169dd6b2bfcSGreg Roach <tbody> 170dd6b2bfcSGreg Roach <?php foreach ($families as $family) : ?> 1716b9cb339SGreg Roach <?php $husb = $family->husband() ?? Registry::individualFactory()->new('H', '0 @H@ INDI', null, $family->tree()) ?> 1726b9cb339SGreg Roach <?php $wife = $family->wife() ?? Registry::individualFactory()->new('W', '0 @W@ INDI', null, $family->tree()) ?> 173dd6b2bfcSGreg Roach 174b16bf9d4SGreg Roach <tr class="<?= $family->isPendingAddition() ? 'wt-new' : '' ?> <?= $family->isPendingDeletion() ? 'wt-old' : '' ?>"> 175dd6b2bfcSGreg Roach <!-- Husband name --> 1768fb4e87cSGreg Roach <td colspan="2" data-sort="<?= e(str_replace([',', Individual::PRAENOMEN_NESCIO, Individual::NOMEN_NESCIO], 'AAAA', implode(',', array_reverse(explode(',', $husb->sortName()))))) ?>"> 177dd6b2bfcSGreg Roach <?php foreach ($husb->getAllNames() as $num => $name) : ?> 1787fa97a69SGreg Roach <?php if ($name['type'] !== '_MARNM' || $num === $husb->getPrimaryName()) : ?> 179*55cc2880SGreg Roach <div> 1807a821518SGreg Roach <a title="<?= $name['type'] === '_MARNM' ? I18N::translate('Married name') : '' ?>" href="<?= e($family->url()) ?>" class="<?= $num === $husb->getPrimaryName() ? '' : 'text-muted' ?>"> 181dd6b2bfcSGreg Roach <?= $name['full'] ?> 182dd6b2bfcSGreg Roach </a> 183dd6b2bfcSGreg Roach <?php if ($num === $husb->getPrimaryName()) : ?> 18408362db4SGreg Roach <small><?= view('icons/sex', ['sex' => $husb->sex()]) ?></small> 185dd6b2bfcSGreg Roach <?php endif ?> 186*55cc2880SGreg Roach </div> 187dd6b2bfcSGreg Roach <?php endif ?> 188dd6b2bfcSGreg Roach <?php endforeach ?> 1895e6816beSGreg Roach <?= view('lists/individual-table-parents', ['individual' => $husb]) ?> 190dd6b2bfcSGreg Roach </td> 191dd6b2bfcSGreg Roach 1928fb4e87cSGreg Roach <td hidden data-sort="<?= e(str_replace([',', Individual::PRAENOMEN_NESCIO, Individual::NOMEN_NESCIO], 'AAAA', $husb->sortName())) ?>"></td> 193dd6b2bfcSGreg Roach 194dd6b2bfcSGreg Roach <!-- Husband age --> 1950653586aSGreg Roach <?php $age = new Age($husb->getBirthDate(), $family->getMarriageDate()) ?> 19653432476SGreg Roach <td class="text-center" data-sort="<?= $age->ageDays() ?>"> 19753432476SGreg Roach <?= $age->ageYearsString() ?> 198dd6b2bfcSGreg Roach </td> 199dd6b2bfcSGreg Roach 200dd6b2bfcSGreg Roach <!-- Wife name --> 2018fb4e87cSGreg Roach <td colspan="2" data-sort="<?= e(str_replace([',', Individual::PRAENOMEN_NESCIO, Individual::NOMEN_NESCIO], 'AAAA', implode(',', array_reverse(explode(',', $wife->sortName()))))) ?>"> 202dd6b2bfcSGreg Roach <?php foreach ($wife->getAllNames() as $num => $name) : ?> 2037fa97a69SGreg Roach <?php if ($name['type'] !== '_MARNM' || $num === $wife->getPrimaryName()) : ?> 204*55cc2880SGreg Roach <div> 2057a821518SGreg Roach <a title="<?= $name['type'] === '_MARNM' ? I18N::translate('Married name') : '' ?>" href="<?= e($family->url()) ?>" class="<?= $num === $wife->getPrimaryName() ? '' : 'text-muted' ?>"> 206dd6b2bfcSGreg Roach <?= $name['full'] ?> 207dd6b2bfcSGreg Roach </a> 208dd6b2bfcSGreg Roach <?php if ($num === $wife->getPrimaryName()) : ?> 20908362db4SGreg Roach <small><?= view('icons/sex', ['sex' => $wife->sex()]) ?></small> 210dd6b2bfcSGreg Roach <?php endif ?> 211*55cc2880SGreg Roach </div> 212dd6b2bfcSGreg Roach <?php endif ?> 213dd6b2bfcSGreg Roach <?php endforeach ?> 2145e6816beSGreg Roach <?= view('lists/individual-table-parents', ['individual' => $wife]) ?> 215dd6b2bfcSGreg Roach </td> 216dd6b2bfcSGreg Roach 2178fb4e87cSGreg Roach <td hidden data-sort="<?= e(str_replace([',', Individual::PRAENOMEN_NESCIO, Individual::NOMEN_NESCIO], 'AAAA', $wife->sortName())) ?>"></td> 218dd6b2bfcSGreg Roach 219dd6b2bfcSGreg Roach <!-- Wife age --> 2200653586aSGreg Roach <?php $age = new Age($wife->getBirthDate(), $family->getMarriageDate()) ?> 22153432476SGreg Roach <td class="text-center" data-sort="<?= $age->ageDays() ?>"> 22253432476SGreg Roach <?= $age->ageYearsString() ?> 223dd6b2bfcSGreg Roach </td> 224dd6b2bfcSGreg Roach 225dd6b2bfcSGreg Roach <!-- Marriage date --> 226dd6b2bfcSGreg Roach <td data-sort="<?= $family->getMarriageDate()->julianDay() ?>"> 227dd6b2bfcSGreg Roach <?php if ($marriage_dates = $family->getAllMarriageDates()) : ?> 228*55cc2880SGreg Roach <?php foreach ($marriage_dates as $marriage_date) : ?> 22966ecd017SGreg Roach <div><?= $marriage_date->display($tree, null, true) ?></div> 230dd6b2bfcSGreg Roach <?php endforeach ?> 231*55cc2880SGreg Roach <?php elseif ($family->facts(['MARR'])->isEmpty()) : ?> 232dd6b2bfcSGreg Roach <?= I18N::translate('no') ?> 23339ca88baSGreg Roach <?php elseif ($family->facts(['MARR'])->isNotEmpty()) : ?> 234dd6b2bfcSGreg Roach <?= I18N::translate('yes') ?> 235dd6b2bfcSGreg Roach <?php endif ?> 236dd6b2bfcSGreg Roach </td> 237dd6b2bfcSGreg Roach 238dd6b2bfcSGreg Roach <!-- Marriage anniversary --> 23953432476SGreg Roach <?php $age = new Age($family->getMarriageDate(), $today) ?> 24053432476SGreg Roach <td class="text-center" data-sort="<?= $age->ageDays() ?>"> 24153432476SGreg Roach <?= $age->ageYearsString() ?> 242dd6b2bfcSGreg Roach </td> 243dd6b2bfcSGreg Roach 244dd6b2bfcSGreg Roach <!-- Marriage place --> 2458c0ff4ddSGreg Roach <td data-sort="<?= e($family->getMarriagePlace()->gedcomName()) ?>"> 246*55cc2880SGreg Roach <?php foreach ($family->getAllMarriagePlaces() as $marriage_place) : ?> 247*55cc2880SGreg Roach <div><?= $marriage_place->shortName(true) ?></div> 248dd6b2bfcSGreg Roach <?php endforeach ?> 249dd6b2bfcSGreg Roach </td> 250dd6b2bfcSGreg Roach 251dd6b2bfcSGreg Roach <!-- Number of children --> 25239ca88baSGreg Roach <td class="text-center" data-sort="<?= $family->numberOfChildren() ?>"> 25339ca88baSGreg Roach <?= I18N::number($family->numberOfChildren()) ?> 254dd6b2bfcSGreg Roach </td> 255dd6b2bfcSGreg Roach 256dd6b2bfcSGreg Roach <!-- Last change --> 257d97083feSGreg Roach <td data-sort="<?= $family->lastChangeTimestamp()->timestamp() ?>"> 2584459dc9aSGreg Roach <?= view('components/datetime', ['timestamp' => $family->lastChangeTimestamp()]) ?> 259dd6b2bfcSGreg Roach </td> 260dd6b2bfcSGreg Roach 261dd6b2bfcSGreg Roach <!-- Filter by marriage date --> 262dd6b2bfcSGreg Roach <td hidden> 26353432476SGreg Roach <?php if ($family->getMarriageDate()->maximumJulianDay() > $hundred_years_ago && $family->getMarriageDate()->maximumJulianDay() <= $today_jd) : ?> 264dd6b2bfcSGreg Roach Y100 265b9597e06SGreg Roach <?php elseif ($family->facts(['MARR'])->isNotEmpty()) : ?> 266dd6b2bfcSGreg Roach YES 267b9597e06SGreg Roach <?php else : ?> 268b9597e06SGreg Roach U 269dd6b2bfcSGreg Roach <?php endif ?> 270b9597e06SGreg Roach <?php if ($family->facts(['DIV'])->isNotEmpty()) : ?> 271dd6b2bfcSGreg Roach D 272dd6b2bfcSGreg Roach <?php endif ?> 27339ca88baSGreg Roach <?php if (count($husb->spouseFamilies()) > 1 || count($wife->spouseFamilies()) > 1) : ?> 274dd6b2bfcSGreg Roach M 275dd6b2bfcSGreg Roach <?php endif ?> 276dd6b2bfcSGreg Roach </td> 277dd6b2bfcSGreg Roach 278dd6b2bfcSGreg Roach <!-- Filter by alive/dead --> 279dd6b2bfcSGreg Roach <td hidden> 280dd6b2bfcSGreg Roach <?php if ($husb->isDead() && $wife->isDead()) : ?> 281dd6b2bfcSGreg Roach Y 282dd6b2bfcSGreg Roach <?php endif ?> 283dd6b2bfcSGreg Roach <?php if ($husb->isDead() && !$wife->isDead()) : ?> 28422d65e5aSGreg Roach <?php if ($wife->sex() === 'F') : ?> 285dd6b2bfcSGreg Roach H 286dd6b2bfcSGreg Roach <?php endif ?> 28722d65e5aSGreg Roach <?php if ($wife->sex() === 'M') : ?> 288dd6b2bfcSGreg Roach W 289dd6b2bfcSGreg Roach <?php endif ?> 290dd6b2bfcSGreg Roach <?php endif ?> 291dd6b2bfcSGreg Roach <?php if (!$husb->isDead() && $wife->isDead()) : ?> 29222d65e5aSGreg Roach <?php if ($husb->sex() === 'M') : ?> 293dd6b2bfcSGreg Roach W 294dd6b2bfcSGreg Roach <?php endif ?> 29522d65e5aSGreg Roach <?php if ($husb->sex() === 'F') : ?> 296dd6b2bfcSGreg Roach H 297dd6b2bfcSGreg Roach <?php endif ?> 298dd6b2bfcSGreg Roach <?php endif ?> 299dd6b2bfcSGreg Roach <?php if (!$husb->isDead() && !$wife->isDead()) : ?> 300dd6b2bfcSGreg Roach N 301dd6b2bfcSGreg Roach <?php endif ?> 302dd6b2bfcSGreg Roach </td> 303dd6b2bfcSGreg Roach 304dd6b2bfcSGreg Roach <!-- Filter by roots/leaves --> 305dd6b2bfcSGreg Roach <td hidden> 3066f04756aSJonathan Jaubart <?php if ($husb->childFamilies()->isEmpty() && $wife->childFamilies()->isEmpty()) : ?> 307dd6b2bfcSGreg Roach R 30839ca88baSGreg Roach <?php elseif (!$husb->isDead() && !$wife->isDead() && $family->numberOfChildren() === 0) : ?> 309dd6b2bfcSGreg Roach L 310dd6b2bfcSGreg Roach <?php endif ?> 311dd6b2bfcSGreg Roach </td> 312dd6b2bfcSGreg Roach </tr> 313dd6b2bfcSGreg Roach <?php endforeach ?> 314dd6b2bfcSGreg Roach </tbody> 3157039fd97SGreg Roach 3167039fd97SGreg Roach <tfoot> 3177039fd97SGreg Roach <tr> 3187039fd97SGreg Roach <th colspan="14"> 319604bfd4bSGreg Roach <div class="btn-group btn-group-sm"> 32033df1db6SGreg Roach <input type="checkbox" class="btn-check" id="btn-toggle-parents" aria-expanded="false" autocomplete="off"> 3212d8276baSGreg Roach <label class="btn btn-secondary" for="btn-toggle-parents"> 3227039fd97SGreg Roach <?= I18N::translate('Show parents') ?> 3232d8276baSGreg Roach </label> 3247039fd97SGreg Roach </div> 3257039fd97SGreg Roach </th> 3267039fd97SGreg Roach </tr> 3277039fd97SGreg Roach </tfoot> 328dd6b2bfcSGreg Roach </table> 3291b860509SRico Sonntag</div> 330