1<?php 2 3use Fisharebest\Webtrees\Http\RequestHandlers\AddParentToIndividualPage; 4use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyPage; 5use Fisharebest\Webtrees\I18N; 6 7?> 8 9<div class="d-flex"> 10 <div class="wt-chart-horizontal-spacer"> 11 <div class="wt-chart-horizontal-line"></div> 12 </div> 13 <div class="align-self-center"> 14 <div class="d-flex"> 15 <div class="wt-chart-horizontal-spacer"> 16 <div class="wt-chart-horizontal-first-parent"></div> 17 </div> 18 19 <div class="align-self-center"> 20 <?php if ($individual === null) : ?> 21 <?= view('chart-box', ['individual' => null]) ?> 22 <?php elseif ($family === null) : ?> 23 <div class="wt-chart-box"> 24 <?php if ($individual->canEdit()) : ?> 25 <a class="btn btn-link" href="<?= e(route(AddParentToIndividualPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'gender' => 'M'])) ?>"> 26 <?= I18N::translate('Add a father') ?> 27 </a> 28 <?php endif ?> 29 </div> 30 <?php elseif ($family->husband() === null) : ?> 31 <div class="wt-chart-box"> 32 <?php if ($family->canEdit()) : ?> 33 <a class="btn btn-link" href="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $family->tree()->name(), 'xref' => $family->xref(), 'famtag' => 'HUSB'])) ?>"> 34 <?= I18N::translate('Add a father') ?> 35 </a> 36 <?php endif ?> 37 </div> 38 <?php else : ?> 39 <?= view('chart-box', ['individual' => $family ? $family->husband() : null]) ?> 40 <?php endif ?> 41 </div> 42 </div> 43 44 <div class="d-flex"> 45 <div class="wt-chart-horizontal-spacer"> 46 <div class="wt-chart-horizontal-last-parent"></div> 47 </div> 48 49 <div class="align-self-center"> 50 <?php if ($individual === null) : ?> 51 <?= view('chart-box', ['individual' => null]) ?> 52 <?php elseif ($family === null) : ?> 53 <div class="wt-chart-box"> 54 <?php if ($individual->canEdit()) : ?> 55 <a class="btn btn-link" href="<?= e(route(AddParentToIndividualPage::class, ['tree' => $individual->tree()->name(), 'xref' => $individual->xref(), 'gender' => 'F'])) ?>"> 56 <?= I18N::translate('Add a mother') ?> 57 </a> 58 <?php endif ?> 59 </div> 60 <?php elseif ($family->wife() === null) : ?> 61 <div class="wt-chart-box"> 62 <?php if ($family->canEdit()) : ?> 63 <a class="btn btn-link" href="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $family->tree()->name(), 'xref' => $family->xref(), 'famtag' => 'WIFE'])) ?>"> 64 <?= I18N::translate('Add a mother') ?> 65 </a> 66 <?php endif ?> 67 </div> 68 <?php else : ?> 69 <?= view('chart-box', ['individual' => $family ? $family->wife() : null]) ?> 70 <?php endif ?> 71 </div> 72 </div> 73 </div> 74 <?php if ($family !== null) : ?> 75 <div class="align-self-center"> 76 <a class="btn btn-text" href="<?= e($family->url()) ?>" title="<?= strip_tags($family->fullName()) ?>"> 77 <?= view('icons/arrow-right') ?> 78 </a> 79 </div> 80 <?php endif ?> 81</div> 82 83