117dd427eSGreg Roach<?php 217dd427eSGreg Roach 317dd427eSGreg Roachuse Fisharebest\Webtrees\I18N; 417dd427eSGreg Roach 517dd427eSGreg Roach?> 617dd427eSGreg Roach 717dd427eSGreg Roach<div class="align-self-center"> 817dd427eSGreg Roach <div class="badge badge-secondary m-2"> 917dd427eSGreg Roach <?php if ($family->children()->count() === 0): ?> 1017dd427eSGreg Roach <?= I18N::translate('No children') ?> 1117dd427eSGreg Roach <?php else: ?> 1217dd427eSGreg Roach <?= I18N::plural('%s child', '%s children', $family->children()->count(), I18N::number($family->children()->count())) ?> 1317dd427eSGreg Roach <?php endif ?> 1417dd427eSGreg Roach </div> 1517dd427eSGreg Roach <?php foreach ($family->children() as $n => $child): ?> 1617dd427eSGreg Roach <div class="d-flex"> 1717dd427eSGreg Roach <?= view('chart-box', ['individual' => $child]) ?> 1817dd427eSGreg Roach <div class="wt-chart-horizontal-spacer"> 1917dd427eSGreg Roach <?php if ($family->children()->count() === 1): ?> 2017dd427eSGreg Roach <div class="wt-chart-horizontal-line"></div> 2117dd427eSGreg Roach <?php elseif ($n === 0): ?> 2217dd427eSGreg Roach <div class="wt-chart-horizontal-first-child"></div> 2317dd427eSGreg Roach <?php elseif ($n + 1 === $family->children()->count()): ?> 2417dd427eSGreg Roach <div class="wt-chart-horizontal-last-child"></div> 2517dd427eSGreg Roach <?php else: ?> 2617dd427eSGreg Roach <div class="wt-chart-horizontal-middle-child"><div class="wt-chart-horizontal-line"></div></div> 2717dd427eSGreg Roach <?php endif ?> 2817dd427eSGreg Roach </div> 2917dd427eSGreg Roach </div> 3017dd427eSGreg Roach <?php endforeach ?> 31*0d55b628SGreg Roach <?php if ($family->canEdit()): ?> 3217dd427eSGreg Roach <div class="wt-chart-box"> 3317dd427eSGreg Roach <a class="btn btn-link" href="<?= e(route('add-child-to-family', ['gender' => 'U', 'ged' => $family->tree()->name(), 'xref' => $family->xref()])) ?>"> 3417dd427eSGreg Roach <?= I18N::translate('Add a child') ?> 3517dd427eSGreg Roach </a> 3617dd427eSGreg Roach <br> 3717dd427eSGreg Roach <?php if ($family->numberOfChildren() > 1) : ?> 3817dd427eSGreg Roach <a class="btn btn-link" href="<?= e(route('reorder-children', ['ged' => $family->tree()->name(), 'xref' => $family->xref()])) ?>"> 3917dd427eSGreg Roach <?= I18N::translate('Re-order children') ?> 4017dd427eSGreg Roach </a> 4117dd427eSGreg Roach <?php endif ?> 4217dd427eSGreg Roach </div> 43*0d55b628SGreg Roach <?php endif ?> 4417dd427eSGreg Roach</div> 4517dd427eSGreg Roach<?php if ($family->children()->count() !== 1): ?> 4617dd427eSGreg Roach <div class="wt-chart-horizontal-spacer"> 4717dd427eSGreg Roach <div class="wt-chart-horizontal-line"></div> 4817dd427eSGreg Roach </div> 4917dd427eSGreg Roach<?php endif ?> 50