1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?> 2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\View; ?> 3dd6b2bfcSGreg Roach 44a2590a5SGreg Roach<div class="wt-tab-relatives py-4"> 5dd6b2bfcSGreg Roach <table class="table table-sm wt-facts-table" role="presentation"> 6dd6b2bfcSGreg Roach <tbody> 7dd6b2bfcSGreg Roach <tr> 8dd6b2bfcSGreg Roach <td> 9dd6b2bfcSGreg Roach <label> 1064490ee2SGreg Roach <input id="show-date-differences" type="checkbox" data-toggle="collapse" data-target=".wt-date-difference"> 11dd6b2bfcSGreg Roach <?= I18N::translate('Date differences') ?> 12dd6b2bfcSGreg Roach </label> 13dd6b2bfcSGreg Roach </td> 14dd6b2bfcSGreg Roach </tr> 15dd6b2bfcSGreg Roach </tbody> 16dd6b2bfcSGreg Roach</table> 17dd6b2bfcSGreg Roach 18*dd2529efSGreg Roach<?php if ($parent_families->isEmpty() && $can_edit) : ?> 19dd6b2bfcSGreg Roach <table class="table table-sm wt-facts-table" role="presentation"> 20dd6b2bfcSGreg Roach <tbody> 21dd6b2bfcSGreg Roach <tr> 22dd6b2bfcSGreg Roach <td> 23f4afa648SGreg Roach <a href="<?= e(route('add-parent-to-individual', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref(), 'gender' => 'M'])) ?>"> 24dd6b2bfcSGreg Roach <?= I18N::translate('Add a father') ?> 25dd6b2bfcSGreg Roach </a> 26dd6b2bfcSGreg Roach </td> 27dd6b2bfcSGreg Roach </tr> 28dd6b2bfcSGreg Roach <tr> 29dd6b2bfcSGreg Roach <td> 30f4afa648SGreg Roach <a href="<?= e(route('add-parent-to-individual', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref(), 'gender' => 'F'])) ?>"> 31dd6b2bfcSGreg Roach <?= I18N::translate('Add a mother') ?> 32dd6b2bfcSGreg Roach </a> 33dd6b2bfcSGreg Roach </td> 34dd6b2bfcSGreg Roach </tr> 35dd6b2bfcSGreg Roach </tbody> 36dd6b2bfcSGreg Roach </table> 37dd6b2bfcSGreg Roach<?php endif ?> 38dd6b2bfcSGreg Roach 39dd6b2bfcSGreg Roach<!-- Parents --> 40dd6b2bfcSGreg Roach<?php foreach ($parent_families as $family) : ?> 41dd6b2bfcSGreg Roach <?= view('modules/relatives/family', [ 42dd6b2bfcSGreg Roach 'individual' => $individual, 43dd6b2bfcSGreg Roach 'family' => $family, 44dd6b2bfcSGreg Roach 'type' => 'FAMC', 45dd6b2bfcSGreg Roach 'label' => $individual->getChildFamilyLabel($family), 46dd6b2bfcSGreg Roach 'fam_access_level' => $fam_access_level, 47dd6b2bfcSGreg Roach ]) ?> 48dd6b2bfcSGreg Roach<?php endforeach ?> 49dd6b2bfcSGreg Roach 50dd6b2bfcSGreg Roach<!-- step-parents --> 51dd6b2bfcSGreg Roach<?php foreach ($step_parent_families as $family) : ?> 52dd6b2bfcSGreg Roach <?= view('modules/relatives/family', [ 53dd6b2bfcSGreg Roach 'individual' => $individual, 54dd6b2bfcSGreg Roach 'family' => $family, 55dd6b2bfcSGreg Roach 'type' => 'FAMC', 56dd6b2bfcSGreg Roach 'label' => $individual->getStepFamilyLabel($family), 57dd6b2bfcSGreg Roach 'fam_access_level' => $fam_access_level, 58dd6b2bfcSGreg Roach ]) ?> 59dd6b2bfcSGreg Roach<?php endforeach ?> 60dd6b2bfcSGreg Roach 61dd6b2bfcSGreg Roach<!-- spouses --> 62dd6b2bfcSGreg Roach<?php foreach ($spouse_families as $family) : ?> 63dd6b2bfcSGreg Roach <?= view('modules/relatives/family', [ 64dd6b2bfcSGreg Roach 'individual' => $individual, 65dd6b2bfcSGreg Roach 'family' => $family, 66dd6b2bfcSGreg Roach 'type' => 'FAMS', 67dd6b2bfcSGreg Roach 'label' => $individual->getSpouseFamilyLabel($family), 68dd6b2bfcSGreg Roach 'fam_access_level' => $fam_access_level, 69dd6b2bfcSGreg Roach ]) ?> 70dd6b2bfcSGreg Roach<?php endforeach ?> 71dd6b2bfcSGreg Roach 72dd6b2bfcSGreg Roach<!-- step-children --> 73dd6b2bfcSGreg Roach<?php foreach ($step_child_familiess as $family) : ?> 74dd6b2bfcSGreg Roach <?= view('modules/relatives/family', [ 75dd6b2bfcSGreg Roach 'individual' => $individual, 76dd6b2bfcSGreg Roach 'family' => $family, 77dd6b2bfcSGreg Roach 'type' => 'FAMS', 7839ca88baSGreg Roach 'label' => $family->fullName(), 79dd6b2bfcSGreg Roach 'fam_access_level' => $fam_access_level, 80dd6b2bfcSGreg Roach ]) ?> 81dd6b2bfcSGreg Roach<?php endforeach ?> 82dd6b2bfcSGreg Roach 83dd6b2bfcSGreg Roach<?php if ($can_edit) : ?> 84dd6b2bfcSGreg Roach <br> 85dd6b2bfcSGreg Roach <table class="table table-sm wt-facts-table" role="presentation"> 86dd6b2bfcSGreg Roach <tbody> 87dd6b2bfcSGreg Roach <?php if (count($spouse_families) > 1) : ?> 88dd6b2bfcSGreg Roach <tr> 89dd6b2bfcSGreg Roach <td> 90f4afa648SGreg Roach <a href="<?= e(route('reorder-spouses', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> 91e39fd5c6SGreg Roach <?= view('icons/reorder') ?> 92dd6b2bfcSGreg Roach <?= I18N::translate('Re-order families') ?> 93dd6b2bfcSGreg Roach </a> 94dd6b2bfcSGreg Roach </td> 95dd6b2bfcSGreg Roach </tr> 96dd6b2bfcSGreg Roach <?php endif ?> 97dd6b2bfcSGreg Roach <tr> 98dd6b2bfcSGreg Roach <td> 99f4afa648SGreg Roach <a href="<?= e(route('link-child-to-family', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> 100dd6b2bfcSGreg Roach <?= I18N::translate('Link this individual to an existing family as a child') ?> 101dd6b2bfcSGreg Roach </a> 102dd6b2bfcSGreg Roach </td> 103dd6b2bfcSGreg Roach </tr> 104dd6b2bfcSGreg Roach 105dd6b2bfcSGreg Roach <tr> 106dd6b2bfcSGreg Roach <td> 107f4afa648SGreg Roach <a href="<?= e(route('add-spouse-to-individual', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> 10839ca88baSGreg Roach <?php if ($individual->sex() !== 'F') : ?> 109dd6b2bfcSGreg Roach <?= I18N::translate('Add a wife') ?> 110dd6b2bfcSGreg Roach <?php else : ?> 111dd6b2bfcSGreg Roach <?= I18N::translate('Add a husband') ?> 112dd6b2bfcSGreg Roach <?php endif ?> 113dd6b2bfcSGreg Roach </a> 114dd6b2bfcSGreg Roach </td> 115dd6b2bfcSGreg Roach </tr> 116dd6b2bfcSGreg Roach 117dd6b2bfcSGreg Roach <tr> 118dd6b2bfcSGreg Roach <td> 119f4afa648SGreg Roach <a href="<?= e(route('link-spouse-to-individual', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> 12039ca88baSGreg Roach <?php if ($individual->sex() !== 'F') : ?> 121dd6b2bfcSGreg Roach <?= I18N::translate('Add a wife using an existing individual') ?> 122dd6b2bfcSGreg Roach <?php else : ?> 123dd6b2bfcSGreg Roach <?= I18N::translate('Add a husband using an existing individual') ?> 124dd6b2bfcSGreg Roach <?php endif ?> 125dd6b2bfcSGreg Roach </a> 126dd6b2bfcSGreg Roach </td> 127dd6b2bfcSGreg Roach </tr> 128dd6b2bfcSGreg Roach 129dd6b2bfcSGreg Roach <tr> 130dd6b2bfcSGreg Roach <td> 131f4afa648SGreg Roach <a href="<?= e(route('add-child-to-individual', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref(), 'gender' => 'U'])) ?>"> 132dd6b2bfcSGreg Roach <?= I18N::translate('Add a child to create a one-parent family') ?> 133dd6b2bfcSGreg Roach </a> 134dd6b2bfcSGreg Roach </td> 135dd6b2bfcSGreg Roach </tr> 136dd6b2bfcSGreg Roach </tbody> 137dd6b2bfcSGreg Roach </table> 138dd6b2bfcSGreg Roach<?php endif ?> 139dd6b2bfcSGreg Roach</div> 140dd6b2bfcSGreg Roach 141dd6b2bfcSGreg Roach<?php View::push('javascript') ?> 142dd6b2bfcSGreg Roach<script> 143dd6b2bfcSGreg Roach 'use strict'; 144dd6b2bfcSGreg Roach 14564490ee2SGreg Roach persistent_toggle("show-date-differences"); 146dd6b2bfcSGreg Roach</script> 147dd6b2bfcSGreg Roach<?php View::endpush() ?> 148