1dd6b2bfcSGreg Roach<?php 2d70512abSGreg Roach 31b860509SRico Sonntagdeclare(strict_types=1); 41b860509SRico Sonntag 5054771e9SGreg Roachuse Fisharebest\Webtrees\Age; 61b860509SRico Sonntaguse Fisharebest\Webtrees\Auth; 71b860509SRico Sonntaguse Fisharebest\Webtrees\Date; 81b860509SRico Sonntaguse Fisharebest\Webtrees\I18N; 9054771e9SGreg Roachuse Fisharebest\Webtrees\Individual; 1087cca37cSGreg Roachuse Fisharebest\Webtrees\Module\ModuleChartInterface; 111b860509SRico Sonntaguse Fisharebest\Webtrees\Module\ModuleInterface; 121b860509SRico Sonntaguse Fisharebest\Webtrees\Module\RelationshipsChartModule; 13d97083feSGreg Roachuse Fisharebest\Webtrees\Registry; 141b860509SRico Sonntaguse Fisharebest\Webtrees\Services\ModuleService; 15b9597e06SGreg Roachuse Fisharebest\Webtrees\Tree; 161b860509SRico Sonntaguse Fisharebest\Webtrees\View; 17054771e9SGreg Roachuse Illuminate\Support\Collection; 181b860509SRico Sonntag 19b9597e06SGreg Roach/** 2036779af1SGreg Roach * @var Collection<int,Individual> $individuals 21054771e9SGreg Roach * @var bool $sosa 22b9597e06SGreg Roach * @var Tree $tree 23b9597e06SGreg Roach */ 24b9597e06SGreg Roach 2555cc2880SGreg Roach// lists require a unique ID in case there are multiple lists per page 262e464181SGreg Roach$table_id = Registry::idFactory()->id(); 27d97083feSGreg Roach$today_jd = Registry::timestampFactory()->now()->julianDay(); 28d97083feSGreg Roach$hundred_years_ago = Registry::timestampFactory()->now()->subtractYears(100)->julianDay(); 29b2a8cedfSGreg Roach$show_estimated_dates = (bool) $tree->getPreference('SHOW_EST_LIST_DATES'); 30054771e9SGreg Roach$today = new Date(strtoupper(date('d M Y'))); 31054771e9SGreg Roach 32d35568b4SGreg Roach$module = Registry::container()->get(ModuleService::class) 3387cca37cSGreg Roach ->findByComponent(ModuleChartInterface::class, $tree, Auth::user()) 340b5fd0a6SGreg Roach ->first(static function (ModuleInterface $module) { 3590d97cc8SGreg Roach return $module instanceof RelationshipsChartModule; 3690d97cc8SGreg Roach }); 37dd6b2bfcSGreg Roach?> 38dd6b2bfcSGreg Roach 39dd6b2bfcSGreg Roach<?php View::push('javascript') ?> 40dd6b2bfcSGreg Roach<script> 4132a5dd8dSGreg Roach$("#<?= e($table_id) ?> > .wt-table-individual").dataTable({ 42dd6b2bfcSGreg Roach processing: true, 43dd6b2bfcSGreg Roach retrieve: true, 44dd6b2bfcSGreg Roach columns: [ 45dd6b2bfcSGreg Roach /* Given names */ { type: "text" }, 46dd6b2bfcSGreg Roach /* Surnames */ { type: "text" }, 47728c8c27SGreg Roach /* SOSA number */ { type: "num", visible: <?= json_encode($sosa, JSON_THROW_ON_ERROR) ?> }, 48dd6b2bfcSGreg Roach /* Birth date */ { type: "num" }, 49dd6b2bfcSGreg Roach /* Anniversary */ { type: "num" }, 50dd6b2bfcSGreg Roach /* Birthplace */ { type: "text" }, 51dd6b2bfcSGreg Roach /* Children */ { type: "num" }, 52dd6b2bfcSGreg Roach /* Deate date */ { type: "num" }, 53dd6b2bfcSGreg Roach /* Anniversary */ { type: "num" }, 54dd6b2bfcSGreg Roach /* Age */ { type: "num" }, 55dd6b2bfcSGreg Roach /* Death place */ { type: "text" }, 56728c8c27SGreg Roach /* Last change */ { visible: <?= json_encode($tree->getPreference('SHOW_LAST_CHANGE'), JSON_THROW_ON_ERROR) ?> }, 57dd6b2bfcSGreg Roach /* Filter sex */ { sortable: false }, 58dd6b2bfcSGreg Roach /* Filter birth */ { sortable: false }, 59dd6b2bfcSGreg Roach /* Filter death */ { sortable: false }, 60dd6b2bfcSGreg Roach /* Filter tree */ { sortable: false } 61dd6b2bfcSGreg Roach ], 62728c8c27SGreg Roach sorting: <?= json_encode($sosa ? [[4, 'asc']] : [[1, 'asc']], JSON_THROW_ON_ERROR) ?> 63dd6b2bfcSGreg Roach}); 64dd6b2bfcSGreg Roach 65dd6b2bfcSGreg Roach$("#<?= e($table_id) ?>") 66dd6b2bfcSGreg Roach /* Hide/show parents */ 674843b94fSGreg Roach .on("click", "#btn-toggle-parents", function() { 685e6816beSGreg Roach $(".wt-individual-list-parents").slideToggle(); 69dd6b2bfcSGreg Roach }) 70dd6b2bfcSGreg Roach /* Filter buttons in table header */ 71604bfd4bSGreg Roach .on("click", "input[data-filter-column]", function() { 72604bfd4bSGreg Roach let checkbox = $(this); 731b860509SRico Sonntag 74604bfd4bSGreg Roach // Deselect other options 753a976702SJonathan Jaubart let siblings = checkbox.siblings("input[type='checkbox']"); 763a976702SJonathan Jaubart siblings.prop("checked", false).removeAttr("checked"); 77604bfd4bSGreg Roach 78604bfd4bSGreg Roach // Apply (or clear) this filter 79604bfd4bSGreg Roach let checked = checkbox.prop("checked"); 80604bfd4bSGreg Roach let filter = checked ? checkbox.data("filter-value") : ""; 8132a5dd8dSGreg Roach let column = $("#<?= e($table_id) ?> .wt-table-individual").DataTable().column(checkbox.data("filter-column")); 82604bfd4bSGreg Roach column.search(filter).draw(); 83604bfd4bSGreg Roach }); 84dd6b2bfcSGreg Roach</script> 85dd6b2bfcSGreg Roach<?php View::endpush() ?> 86dd6b2bfcSGreg Roach 8732a5dd8dSGreg Roach<div id="<?= e($table_id) ?>"> 8832a5dd8dSGreg Roach <table class="table table-bordered table-sm wt-table-individual" 89b6c326d8SGreg Roach <?= view('lists/datatables-attributes') ?> 90b6c326d8SGreg Roach > 91dd6b2bfcSGreg Roach <thead> 92dd6b2bfcSGreg Roach <tr> 93dd6b2bfcSGreg Roach <th colspan="16"> 94dd6b2bfcSGreg Roach <div class="btn-toolbar d-flex justify-content-between mb-2" role="toolbar"> 953a976702SJonathan Jaubart <div class="btn-group btn-group-sm" role="group"> 963a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-sex-M" class="btn-check" type="checkbox" data-filter-column="12" data-filter-value="M" autocomplete="off"> 973a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-sex-M" class="btn btn-outline-secondary" title="<?= I18N::translate('Show only males.') ?>"> 9808362db4SGreg Roach <?= view('icons/sex', ['sex' => 'M']) ?> 99604bfd4bSGreg Roach </label> 1003a976702SJonathan Jaubart 1013a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-sex-F" class="btn-check" type="checkbox" data-filter-column="12" data-filter-value="F" autocomplete="off"> 1023a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-sex-F" class="btn btn-outline-secondary" title="<?= I18N::translate('Show only females.') ?>"> 10308362db4SGreg Roach <?= view('icons/sex', ['sex' => 'F']) ?> 104604bfd4bSGreg Roach </label> 1053a976702SJonathan Jaubart 1063a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-sex-U" class="btn-check" type="checkbox" data-filter-column="12" data-filter-value="U" autocomplete="off"> 1073a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-sex-U" class="btn btn-outline-secondary" title="<?= I18N::translate('Show only individuals for whom the gender is not known.') ?>"> 10808362db4SGreg Roach <?= view('icons/sex', ['sex' => 'U']) ?> 109604bfd4bSGreg Roach </label> 110dd6b2bfcSGreg Roach </div> 111604bfd4bSGreg Roach 1123a976702SJonathan Jaubart <div class="btn-group btn-group-sm" role="group"> 1133a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-dead-N" class="btn-check" type="checkbox" data-filter-column="14" data-filter-value="N" autocomplete="off"> 1143a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-dead-N" class="btn btn-outline-secondary" title="<?= I18N::translate('Show individuals who are alive or couples where both partners are alive.') ?>"> 115dd6b2bfcSGreg Roach <?= I18N::translate('Alive') ?> 116604bfd4bSGreg Roach </label> 1173a976702SJonathan Jaubart 1183a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-dead-Y" class="btn-check" type="checkbox" data-filter-column="14" data-filter-value="Y" autocomplete="off"> 1193a976702SJonathan 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.') ?>"> 120dd6b2bfcSGreg Roach <?= I18N::translate('Dead') ?> 121604bfd4bSGreg Roach </label> 1223a976702SJonathan Jaubart 1233a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-dead-YES" class="btn-check" type="checkbox" data-filter-column="14" data-filter-value="YES" autocomplete="off"> 1243a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-dead-YES" class="btn btn-outline-secondary" title="<?= I18N::translate('Show individuals who died more than 100 years ago.') ?>"> 125dd6b2bfcSGreg Roach <?= I18N::translate('Death') ?>>100 126604bfd4bSGreg Roach </label> 1273a976702SJonathan Jaubart 1283a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-alive-Y100" class="btn-check" type="checkbox" data-filter-column="14" data-filter-value="Y100" autocomplete="off"> 1293a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-alive-Y100" class="btn btn-outline-secondary" title="<?= I18N::translate('Show individuals who died within the last 100 years.') ?>"> 130392561bbSGreg Roach <?= I18N::translate('Death') ?><=100 131604bfd4bSGreg Roach </label> 132dd6b2bfcSGreg Roach </div> 133604bfd4bSGreg Roach 1343a976702SJonathan Jaubart <div class="btn-group btn-group-sm" role="group"> 1353a976702SJonathan Jaubart 1363a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-born-YES" class="btn-check" type="checkbox" data-filter-column="13" data-filter-value="YES" autocomplete="off"> 1373a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-born-YES" class="btn btn-outline-secondary" title="<?= I18N::translate('Show individuals born more than 100 years ago.') ?>"> 138dd6b2bfcSGreg Roach <?= I18N::translate('Birth') ?>>100 139604bfd4bSGreg Roach </label> 1403a976702SJonathan Jaubart 1413a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-born-Y100" class="btn-check" type="checkbox" data-filter-column="13" data-filter-value="Y100" autocomplete="off"> 1423a976702SJonathan Jaubart <label for="<?= e($table_id) ?>-bg-born-Y100" class="btn btn-outline-secondary" title="<?= I18N::translate('Show individuals born within the last 100 years.') ?>"> 143dd6b2bfcSGreg Roach <?= I18N::translate('Birth') ?><=100 144604bfd4bSGreg Roach </label> 145dd6b2bfcSGreg Roach </div> 146604bfd4bSGreg Roach 1473a976702SJonathan Jaubart <div class="btn-group btn-group-sm" role="group"> 1483a976702SJonathan Jaubart 1493a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-roots-R" class="btn-check" type="checkbox" data-filter-column="15" data-filter-value="R" autocomplete="off"> 1503a976702SJonathan 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.') ?>"> 151dd6b2bfcSGreg Roach <?= I18N::translate('Roots') ?> 152604bfd4bSGreg Roach </label> 1533a976702SJonathan Jaubart 1543a976702SJonathan Jaubart <input id="<?= e($table_id) ?>-bg-roots-L" class="btn-check" type="checkbox" data-filter-column="15" data-filter-value="L" autocomplete="off"> 1553a976702SJonathan 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.') ?>"> 156dd6b2bfcSGreg Roach <?= I18N::translate('Leaves') ?> 157604bfd4bSGreg Roach </label> 158dd6b2bfcSGreg Roach </div> 159dd6b2bfcSGreg Roach </div> 160dd6b2bfcSGreg Roach </th> 161dd6b2bfcSGreg Roach </tr> 162dd6b2bfcSGreg Roach <tr> 163dd6b2bfcSGreg Roach <th><?= I18N::translate('Given names') ?></th> 164dd6b2bfcSGreg Roach <th><?= I18N::translate('Surname') ?></th> 165dd6b2bfcSGreg Roach <th><?= /* I18N: Abbreviation for “Sosa-Stradonitz number”. This is an individual’s surname, so may need transliterating into non-latin alphabets. */ 166dd6b2bfcSGreg Roach I18N::translate('Sosa') ?></th> 167dd6b2bfcSGreg Roach <th><?= I18N::translate('Birth') ?></th> 168dd6b2bfcSGreg Roach <th> 169e39fd5c6SGreg Roach <span title="<?= I18N::translate('Anniversary') ?>"> 170e39fd5c6SGreg Roach <?= view('icons/anniversary') ?> 171e39fd5c6SGreg Roach </span> 172dd6b2bfcSGreg Roach </th> 173dd6b2bfcSGreg Roach <th><?= I18N::translate('Place') ?></th> 174dd6b2bfcSGreg Roach <th> 175dd6b2bfcSGreg Roach <i class="icon-children" title="<?= I18N::translate('Children') ?>"></i> 176dd6b2bfcSGreg Roach </th> 177dd6b2bfcSGreg Roach <th><?= I18N::translate('Death') ?></th> 178dd6b2bfcSGreg Roach <th> 179e39fd5c6SGreg Roach <span title="<?= I18N::translate('Anniversary') ?>"> 180e39fd5c6SGreg Roach <?= view('icons/anniversary') ?> 181e39fd5c6SGreg Roach </span> 182dd6b2bfcSGreg Roach </th> 183dd6b2bfcSGreg Roach <th><?= I18N::translate('Age') ?></th> 184dd6b2bfcSGreg Roach <th><?= I18N::translate('Place') ?></th> 185dd6b2bfcSGreg Roach <th><?= I18N::translate('Last change') ?></th> 186dd6b2bfcSGreg Roach <th hidden></th> 187dd6b2bfcSGreg Roach <th hidden></th> 188dd6b2bfcSGreg Roach <th hidden></th> 189dd6b2bfcSGreg Roach <th hidden></th> 190dd6b2bfcSGreg Roach </tr> 191dd6b2bfcSGreg Roach </thead> 192dd6b2bfcSGreg Roach 193dd6b2bfcSGreg Roach <tbody> 194dd6b2bfcSGreg Roach <?php foreach ($individuals as $key => $individual) : ?> 195b16bf9d4SGreg Roach <tr class="<?= $individual->isPendingAddition() ? 'wt-new' : '' ?> <?= $individual->isPendingDeletion() ? 'wt-old' : '' ?>"> 1968fb4e87cSGreg Roach <td colspan="2" data-sort="<?= e(str_replace([',', Individual::PRAENOMEN_NESCIO, Individual::NOMEN_NESCIO], 'AAAA', implode(',', array_reverse(explode(',', $individual->sortName()))))) ?>"> 197dd6b2bfcSGreg Roach <?php foreach ($individual->getAllNames() as $num => $name) : ?> 19855cc2880SGreg Roach <div> 1997a821518SGreg Roach <a title="<?= $name['type'] === '_MARNM' ? I18N::translate('Married name') : '' ?>" href="<?= e($individual->url()) ?>" class="<?= $num === $individual->getPrimaryName() ? '' : 'text-muted' ?>"> 200dd6b2bfcSGreg Roach <?= $name['full'] ?> 201dd6b2bfcSGreg Roach </a> 202dd6b2bfcSGreg Roach <?php if ($num === $individual->getPrimaryName()) : ?> 20308362db4SGreg Roach <small><?= view('icons/sex', ['sex' => $individual->sex()]) ?></small> 204dd6b2bfcSGreg Roach <?php endif ?> 20555cc2880SGreg Roach </div> 206dd6b2bfcSGreg Roach <?php endforeach ?> 2075e6816beSGreg Roach <?= view('lists/individual-table-parents', ['individual' => $individual]) ?> 208dd6b2bfcSGreg Roach </td> 209dd6b2bfcSGreg Roach 2108fb4e87cSGreg Roach <td hidden data-sort="<?= e(str_replace([',', Individual::PRAENOMEN_NESCIO, Individual::NOMEN_NESCIO], 'AAAA', $individual->sortName())) ?>"></td> 211dd6b2bfcSGreg Roach 212242a7862SGreg Roach <td class="text-center" data-sort="<?= $key ?>"> 213dd6b2bfcSGreg Roach <?php if ($sosa) : ?> 21484b37362SGreg Roach <?php if ($module instanceof RelationshipsChartModule) : ?> 21584b37362SGreg Roach <a href="<?= e($module->chartUrl($individuals[1], ['xref2' => $individual->xref()])) ?>" rel="nofollow" title="<?= I18N::translate('Relationships') ?>" rel="nofollow"> 216dd6b2bfcSGreg Roach <?= I18N::number($key) ?> 217dd6b2bfcSGreg Roach </a> 21884b37362SGreg Roach <?php else : ?> 21984b37362SGreg Roach <?= I18N::number($key) ?> 22084b37362SGreg Roach <?php endif ?> 221dd6b2bfcSGreg Roach <?php endif ?> 222dd6b2bfcSGreg Roach </td> 223dd6b2bfcSGreg Roach 224dd6b2bfcSGreg Roach <!-- Birthdate --> 225054771e9SGreg Roach <?php $estimated_birth_date = $individual->getEstimatedBirthDate(); ?> 226054771e9SGreg Roach 227054771e9SGreg Roach <td data-sort="<?= $estimated_birth_date->julianDay() ?>"> 228dd6b2bfcSGreg Roach <?php $birth_dates = $individual->getAllBirthDates(); ?> 229dd6b2bfcSGreg Roach 23055cc2880SGreg Roach <?php foreach ($birth_dates as $birth_date) : ?> 23155cc2880SGreg Roach <div><?= $birth_date->display($tree, null, true) ?></div> 232dd6b2bfcSGreg Roach <?php endforeach ?> 23314147f6fSGreg Roach 23455cc2880SGreg Roach <?php if ($birth_dates === [] && $show_estimated_dates) : ?> 23566ecd017SGreg Roach <?= $estimated_birth_date->display($tree, null, true) ?> 23614147f6fSGreg Roach <?php endif ?> 237dd6b2bfcSGreg Roach </td> 238dd6b2bfcSGreg Roach 239dd6b2bfcSGreg Roach <!-- Birth anniversary --> 24053432476SGreg Roach <td class="text-center" data-sort="<?= - $estimated_birth_date->julianDay() ?>"> 24153432476SGreg Roach <?= (new Age($birth_dates[0] ?? new Date(''), $today))->ageYearsString() ?> 242dd6b2bfcSGreg Roach </td> 243dd6b2bfcSGreg Roach 2440653586aSGreg Roach <!-- birthplace --> 2458c0ff4ddSGreg Roach <td data-sort="<?= e($individual->getBirthPlace()->gedcomName()) ?>"> 24655cc2880SGreg Roach <?php foreach ($individual->getAllBirthPlaces() as $birth_place) : ?> 24755cc2880SGreg Roach <div><?= $birth_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="<?= $individual->numberOfChildren() ?>"> 25339ca88baSGreg Roach <?= I18N::number($individual->numberOfChildren()) ?> 254dd6b2bfcSGreg Roach </td> 255dd6b2bfcSGreg Roach 256dd6b2bfcSGreg Roach <!-- Death date --> 257dd6b2bfcSGreg Roach <?php $death_dates = $individual->getAllDeathDates() ?> 258dd6b2bfcSGreg Roach <td data-sort="<?= $individual->getEstimatedDeathDate()->julianDay() ?>"> 259*c5402244SGreg Roach <?php foreach ($death_dates as $death_date) : ?> 26055cc2880SGreg Roach <div><?= $death_date->display($tree, null, true) ?></div> 261dd6b2bfcSGreg Roach <?php endforeach ?> 26214147f6fSGreg Roach 26355cc2880SGreg Roach <?php if ($death_dates === [] && $show_estimated_dates && $individual->getEstimatedDeathDate()->minimumDate()->minimumJulianDay() < $today_jd) : ?> 26466ecd017SGreg Roach <?= $individual->getEstimatedDeathDate()->display($tree, null, true) ?> 26514147f6fSGreg Roach <?php endif ?> 266dd6b2bfcSGreg Roach </td> 267dd6b2bfcSGreg Roach 268dd6b2bfcSGreg Roach <!-- Death anniversary --> 26953432476SGreg Roach <td class="text-center" data-sort="<?= - $individual->getEstimatedDeathDate()->julianDay() ?>"> 27053432476SGreg Roach <?= (new Age($death_dates[0] ?? new Date(''), $today))->ageYearsString() ?> 271dd6b2bfcSGreg Roach </td> 272dd6b2bfcSGreg Roach 273dd6b2bfcSGreg Roach <!-- Age at death --> 27453432476SGreg Roach <?php $age = new Age($birth_dates[0] ?? new Date(''), $death_dates[0] ?? new Date('')) ?> 27553432476SGreg Roach <td class="text-center" data-sort="<?= $age->ageDays() ?>"> 27653432476SGreg Roach <?= $age->ageYearsString() ?> 277dd6b2bfcSGreg Roach </td> 278dd6b2bfcSGreg Roach 279dd6b2bfcSGreg Roach <!-- Death place --> 2808c0ff4ddSGreg Roach <td data-sort="<?= e($individual->getDeathPlace()->gedcomName()) ?>"> 28155cc2880SGreg Roach <?php foreach ($individual->getAllDeathPlaces() as $death_place) : ?> 28255cc2880SGreg Roach <div><?= $death_place->shortName(true) ?></div> 283dd6b2bfcSGreg Roach <?php endforeach ?> 284dd6b2bfcSGreg Roach </td> 285dd6b2bfcSGreg Roach 286dd6b2bfcSGreg Roach <!-- Last change --> 287d97083feSGreg Roach <td data-sort="<?= $individual->lastChangeTimestamp()->timestamp() ?>"> 2884459dc9aSGreg Roach <?= view('components/datetime', ['timestamp' => $individual->lastChangeTimestamp()]) ?> 289dd6b2bfcSGreg Roach </td> 290dd6b2bfcSGreg Roach 291dd6b2bfcSGreg Roach <!-- Filter by sex --> 292dd6b2bfcSGreg Roach <td hidden> 29339ca88baSGreg Roach <?= $individual->sex() ?> 294dd6b2bfcSGreg Roach </td> 295dd6b2bfcSGreg Roach 296dd6b2bfcSGreg Roach <!-- Filter by birthdate --> 297dd6b2bfcSGreg Roach <td hidden> 298054771e9SGreg Roach <?php if ($estimated_birth_date->maximumJulianDay() > $hundred_years_ago && $estimated_birth_date->maximumJulianDay() <= $today_jd) : ?> 299dd6b2bfcSGreg Roach Y100 300dd6b2bfcSGreg Roach <?php else : ?> 301dd6b2bfcSGreg Roach YES 302dd6b2bfcSGreg Roach <?php endif ?> 303dd6b2bfcSGreg Roach </td> 304dd6b2bfcSGreg Roach 305dd6b2bfcSGreg Roach <!-- Filter by death date --> 306dd6b2bfcSGreg Roach <td hidden> 307b9597e06SGreg Roach <?php if ($individual->getEstimatedDeathDate()->maximumJulianDay() > $hundred_years_ago && $individual->getEstimatedDeathDate()->maximumJulianDay() <= $today_jd) : ?> 308dd6b2bfcSGreg Roach Y100 309dd6b2bfcSGreg Roach <?php elseif ($individual->isDead()) : ?> 310dd6b2bfcSGreg Roach YES 311dd6b2bfcSGreg Roach <?php else : ?> 312dd6b2bfcSGreg Roach N 313dd6b2bfcSGreg Roach <?php endif ?> 314dd6b2bfcSGreg Roach </td> 315dd6b2bfcSGreg Roach 316dd6b2bfcSGreg Roach <!-- Filter by roots/leaves --> 317dd6b2bfcSGreg Roach <td hidden> 31808662657SGreg Roach <?php if ($individual->childFamilies()->isEmpty()) : ?> 319dd6b2bfcSGreg Roach R 32039ca88baSGreg Roach <?php elseif (!$individual->isDead() && $individual->numberOfChildren() < 1) : ?> 321dd6b2bfcSGreg Roach L 322dd6b2bfcSGreg Roach <?php endif ?> 323dd6b2bfcSGreg Roach </td> 324dd6b2bfcSGreg Roach </tr> 325dd6b2bfcSGreg Roach <?php endforeach ?> 326dd6b2bfcSGreg Roach </tbody> 3277039fd97SGreg Roach 3287039fd97SGreg Roach <tfoot> 3297039fd97SGreg Roach <tr> 3307039fd97SGreg Roach <th colspan="16"> 331604bfd4bSGreg Roach <div class="btn-group btn-group-sm"> 33233df1db6SGreg Roach <input type="checkbox" class="btn-check" id="btn-toggle-parents" data-wt-persist="individuals-parents" autocomplete="off"> 3332d8276baSGreg Roach <label class="btn btn-secondary" for="btn-toggle-parents"> 3347039fd97SGreg Roach <?= I18N::translate('Show parents') ?> 3352d8276baSGreg Roach </label> 3367039fd97SGreg Roach </div> 3377039fd97SGreg Roach </th> 3387039fd97SGreg Roach </tr> 3397039fd97SGreg Roach </tfoot> 340dd6b2bfcSGreg Roach </table> 3411b860509SRico Sonntag</div> 342dd6b2bfcSGreg Roach 343