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