117dd427eSGreg Roach<?php 217dd427eSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 57c2c99faSGreg Roachuse Fisharebest\Webtrees\Family; 67c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddParentToIndividualPage; 77c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyPage; 817dd427eSGreg Roachuse Fisharebest\Webtrees\I18N; 97c2c99faSGreg Roachuse Fisharebest\Webtrees\Individual; 107c2c99faSGreg Roach 117c2c99faSGreg Roach/** 12efd4768bSGreg Roach * @var Family $family 13bd29d468SGreg Roach * @var Individual|null $individual 14efd4768bSGreg Roach * @var Family|null $parent_family 157c2c99faSGreg Roach */ 1617dd427eSGreg Roach 1717dd427eSGreg Roach?> 1817dd427eSGreg Roach 19e660065eSGreg Roach<div class="d-flex my-2"> 2017dd427eSGreg Roach <div class="wt-chart-horizontal-spacer"> 2117dd427eSGreg Roach <div class="wt-chart-horizontal-line"></div> 2217dd427eSGreg Roach </div> 2317dd427eSGreg Roach <div class="align-self-center"> 2417dd427eSGreg Roach <div class="d-flex"> 2517dd427eSGreg Roach <div class="wt-chart-horizontal-spacer"> 2617dd427eSGreg Roach <div class="wt-chart-horizontal-first-parent"></div> 2717dd427eSGreg Roach </div> 2817dd427eSGreg Roach 2917dd427eSGreg Roach <div class="align-self-center"> 3017dd427eSGreg Roach <?php if ($individual === null) : ?> 310d55b628SGreg Roach <?= view('chart-box', ['individual' => null]) ?> 32efd4768bSGreg Roach <?php elseif ($parent_family === null) : ?> 33ff8836abSGreg Roach <div class="wt-chart-box wt-chart-box-m"> 340d55b628SGreg Roach <?php if ($individual->canEdit()) : ?> 35efd4768bSGreg Roach <a class="btn btn-link" href="<?= e(route(AddParentToIndividualPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'sex' => 'M', 'url' => $family->url()])) ?>"> 3617dd427eSGreg Roach <?= I18N::translate('Add a father') ?> 3717dd427eSGreg Roach </a> 380d55b628SGreg Roach <?php endif ?> 3917dd427eSGreg Roach </div> 40efd4768bSGreg Roach <?php elseif ($parent_family->husband() === null) : ?> 41ff8836abSGreg Roach <div class="wt-chart-box wt-chart-box-m"> 42efd4768bSGreg Roach <?php if ($parent_family->canEdit()) : ?> 43efd4768bSGreg Roach <a class="btn btn-link" href="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $parent_family->tree()->name(), 'xref' => $parent_family->xref(), 'sex' => 'M', 'url' => $family->url()])) ?>"> 4417dd427eSGreg Roach <?= I18N::translate('Add a father') ?> 4517dd427eSGreg Roach </a> 460d55b628SGreg Roach <?php endif ?> 4717dd427eSGreg Roach </div> 4817dd427eSGreg Roach <?php else : ?> 4941acc92bSGreg Roach <?= view('chart-box', ['individual' => $parent_family->husband()]) ?> 5017dd427eSGreg Roach <?php endif ?> 5117dd427eSGreg Roach </div> 5217dd427eSGreg Roach </div> 5317dd427eSGreg Roach 5417dd427eSGreg Roach <div class="d-flex"> 5517dd427eSGreg Roach <div class="wt-chart-horizontal-spacer"> 5617dd427eSGreg Roach <div class="wt-chart-horizontal-last-parent"></div> 5717dd427eSGreg Roach </div> 5817dd427eSGreg Roach 5917dd427eSGreg Roach <div class="align-self-center"> 6017dd427eSGreg Roach <?php if ($individual === null) : ?> 610d55b628SGreg Roach <?= view('chart-box', ['individual' => null]) ?> 62efd4768bSGreg Roach <?php elseif ($parent_family === null) : ?> 63ff8836abSGreg Roach <div class="wt-chart-box wt-chart-box-f"> 640d55b628SGreg Roach <?php if ($individual->canEdit()) : ?> 65efd4768bSGreg Roach <a class="btn btn-link" href="<?= e(route(AddParentToIndividualPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'sex' => 'F', 'url' => $family->url()])) ?>"> 6617dd427eSGreg Roach <?= I18N::translate('Add a mother') ?> 6717dd427eSGreg Roach </a> 680d55b628SGreg Roach <?php endif ?> 6917dd427eSGreg Roach </div> 70efd4768bSGreg Roach <?php elseif ($parent_family->wife() === null) : ?> 71ff8836abSGreg Roach <div class="wt-chart-box wt-chart-box-f"> 72efd4768bSGreg Roach <?php if ($parent_family->canEdit()) : ?> 73efd4768bSGreg Roach <a class="btn btn-link" href="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $parent_family->tree()->name(), 'xref' => $parent_family->xref(), 'sex' => 'F', 'url' => $family->url()])) ?>"> 7417dd427eSGreg Roach <?= I18N::translate('Add a mother') ?> 7517dd427eSGreg Roach </a> 760d55b628SGreg Roach <?php endif ?> 7717dd427eSGreg Roach </div> 7817dd427eSGreg Roach <?php else : ?> 7941acc92bSGreg Roach <?= view('chart-box', ['individual' => $parent_family->wife()]) ?> 8017dd427eSGreg Roach <?php endif ?> 8117dd427eSGreg Roach </div> 8217dd427eSGreg Roach </div> 8317dd427eSGreg Roach </div> 84efd4768bSGreg Roach <?php if ($parent_family !== null) : ?> 8517dd427eSGreg Roach <div class="align-self-center"> 86efd4768bSGreg Roach <a class="btn btn-text" href="<?= e($parent_family->url()) ?>" title="<?= strip_tags($parent_family->fullName()) ?>"> 8717dd427eSGreg Roach <?= view('icons/arrow-right') ?> 8817dd427eSGreg Roach </a> 8917dd427eSGreg Roach </div> 9017dd427eSGreg Roach <?php endif ?> 9117dd427eSGreg Roach</div> 9217dd427eSGreg Roach 93